Merge pull request #3263 from twitherspoon/3191_2_help_cli_feature

Added code to support no argument help command
This commit is contained in:
Aanand Prasad 2016-04-19 12:14:24 +01:00
commit 984f839d33
2 changed files with 10 additions and 5 deletions

View file

@ -372,10 +372,14 @@ class TopLevelCommand(object):
"""
Get help on a command.
Usage: help COMMAND
Usage: help [COMMAND]
"""
handler = get_handler(cls, options['COMMAND'])
raise SystemExit(getdoc(handler))
if options['COMMAND']:
subject = get_handler(cls, options['COMMAND'])
else:
subject = cls
print(getdoc(subject))
def kill(self, options):
"""