python-fire
python-fire copied to clipboard
Feature request short arguments in help text
Saw short arguments were added in #141, which looks great!
I was wondering if it'd be possible to include the short args in help text too?
I was thinking something like, given:
# foo.py
import fire
def func(foo=False, bar='bar', baz='dupe'):
pass
if __name__ == '__main__':
fire.Fire(func)
The output could change like this:
# python foo.py --help
FLAGS
- --foo=FOO
+ -f, --foo=FOO
Default: False
--bar=BAR
Default: 'bar'
--baz=BAZ
Default: 'dupe'
I'd be happy to try and pr this myself if you think it's worth adding?