Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 26238:69da16b366ad
help: fix help argument parsing and documentation
support combining -c and -e
previously -k was misdocumented:
* the first line didn't mention it
* the help half implied you could do help -k keyword topic
with these changes, -k just changes the search method
support -c and -e for -k searches
author | timeless@mozdev.org |
---|---|
date | Thu, 10 Sep 2015 20:22:37 -0400 |
parents | 29d29a82263f |
children | 4b685712fa45 |
comparison
equal
deleted
inserted
replaced
26237:1c6f7cc52da9 | 26238:69da16b366ad |
---|---|
3940 displayer.close() | 3940 displayer.close() |
3941 | 3941 |
3942 @command('help', | 3942 @command('help', |
3943 [('e', 'extension', None, _('show only help for extensions')), | 3943 [('e', 'extension', None, _('show only help for extensions')), |
3944 ('c', 'command', None, _('show only help for commands')), | 3944 ('c', 'command', None, _('show only help for commands')), |
3945 ('k', 'keyword', '', _('show topics matching keyword')), | 3945 ('k', 'keyword', None, _('show topics matching keyword')), |
3946 ], | 3946 ], |
3947 _('[-ec] [TOPIC]'), | 3947 _('[-eck] [TOPIC]'), |
3948 norepo=True) | 3948 norepo=True) |
3949 def help_(ui, name=None, **opts): | 3949 def help_(ui, name=None, **opts): |
3950 """show help for a given topic or a help overview | 3950 """show help for a given topic or a help overview |
3951 | 3951 |
3952 With no arguments, print a list of commands with short help messages. | 3952 With no arguments, print a list of commands with short help messages. |