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

Make cmd_map map to possibly arbitrary packages #10

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@jjatria

jjatria commented Aug 14, 2017

This patch modifies the behaviour of cmd_map to always return
the full name of the package implementing a given command, or
return undef trying.

Aliases that map to a string starting with a '+' sign are returned
as-is, mimicking the behaviour in other distributions. This makes
it possible to accept common commands (like 'help' or 'version') and
pass them to existing packages that can be extended by other users.

Make cmd_map map to possibly arbitrary packages
This patch modifies the behaviour of cmd_map to always return
the full name of the package implementing a given command, or
return undef trying.

Aliases that map to a string starting with a '+' sign are returned
as-is, mimicking the behaviour in other distributions. This makes
it possible to accept common commands (like 'help' or 'version') and
pass them to existing packages that can be extended by other users.
@jjatria

This comment has been minimized.

Show comment
Hide comment
@jjatria

jjatria Aug 14, 2017

Possible improvements that this patch does not add:

  • Returning the mapping of all commands and aliases to their final package names (which might be useful for introspection).

  • Allowing recursive aliasing.

jjatria commented Aug 14, 2017

Possible improvements that this patch does not add:

  • Returning the mapping of all commands and aliases to their final package names (which might be useful for introspection).

  • Allowing recursive aliasing.

@jjatria jjatria referenced this pull request Aug 14, 2017

Closed

Default commands #12

@paultcochrane

This comment has been minimized.

Show comment
Hide comment
@paultcochrane

paultcochrane Oct 8, 2017

Owner

Merged in 2427f50. Many thanks!

It seems that this change is also submitted as part of PR#12. Have I got that right?

Owner

paultcochrane commented Oct 8, 2017

Merged in 2427f50. Many thanks!

It seems that this change is also submitted as part of PR#12. Have I got that right?

@jjatria

This comment has been minimized.

Show comment
Hide comment
@jjatria

jjatria Oct 8, 2017

jjatria commented Oct 8, 2017

@paultcochrane

This comment has been minimized.

Show comment
Hide comment
@paultcochrane

paultcochrane Oct 9, 2017

Owner

You're quite right. Unfortunately, I read the notes for PR#12 more closely after I made the comment and yes, you'd made the comment about being based off the other commit. My apologies for the extra noise!

Owner

paultcochrane commented Oct 9, 2017

You're quite right. Unfortunately, I read the notes for PR#12 more closely after I made the comment and yes, you'd made the comment about being based off the other commit. My apologies for the extra noise!

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