-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
In many cases, several names are needed to invoke the same command.
It would be nice to have a way to specify an alias for a command, and have the alias mentioned in the help, without the need to define repeated entries in a command dictionary, and without the redefined function appearing several times in the help message.
For instance, doing this:
# 1.py
import clize
def foo():
"Function foo"
pass
def bar():
"Function bar"
pass
if __name__ == '__main__':
clize.run(dict(foo=foo, bar=bar, foo2=foo))produces
Usage: 1.py command [args...]
Commands:
foo Function foo
bar Function bar
foo2 Function foo
The desired outcome (by whatever method is implemented) would be more like
Usage: 1.py command [args...]
Commands:
foo Function foo (alias: foo2)
bar Function bar
epsy
Metadata
Metadata
Assignees
Labels
No labels