New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide aliases from command list, show in help text #482

Merged
merged 4 commits into from Jul 11, 2017

Conversation

Projects
None yet
2 participants
@cooper
Contributor

cooper commented Jul 10, 2017

@jlu5 jlu5 added this to the v2.0 milestone Jul 10, 2017

@jlu5 jlu5 self-assigned this Jul 10, 2017

@jlu5 jlu5 added the enhancement label Jul 10, 2017

@jlu5

This comment has been minimized.

Show comment
Hide comment
@jlu5

jlu5 Jul 10, 2017

Owner

I think condensing the add_cmd() calls in each plugin into something like:

utils.add_cmd(func, 'dosomething', aliases=('command1', 'command2'))

would be more straightforward.


In the future it also may be worth moving the featured/alias commands lists to attributes of each command function, to reduce the cleanup work needed when deregistering commands. This isn't something too urgent though, so it's fine to leave it for later. (We could even make command functions a class implementing __call__ to for even greater flexibility)

Owner

jlu5 commented Jul 10, 2017

I think condensing the add_cmd() calls in each plugin into something like:

utils.add_cmd(func, 'dosomething', aliases=('command1', 'command2'))

would be more straightforward.


In the future it also may be worth moving the featured/alias commands lists to attributes of each command function, to reduce the cleanup work needed when deregistering commands. This isn't something too urgent though, so it's fine to leave it for later. (We could even make command functions a class implementing __call__ to for even greater flexibility)

@jlu5 jlu5 merged commit f0379d7 into jlu5:devel Jul 11, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jlu5

This comment has been minimized.

Show comment
Hide comment
@jlu5

jlu5 Jul 11, 2017

Owner

Merged with tweaks in 6437721, thanks!

Owner

jlu5 commented Jul 11, 2017

Merged with tweaks in 6437721, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment