diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2016-12-29 16:49:52 +0100 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-01-10 08:57:06 +0100 |
commit | 6a89e5ae98e478acd387ba32d825d3fa1392d8cf (patch) | |
tree | d12a6c916eb68f16b53499dbc320d9a6efb27ddb /alot/__main__.py | |
parent | df0f29fb763429729c0db35c72d24e6c2344e99a (diff) |
Document subcommands in help output
Diffstat (limited to 'alot/__main__.py')
-rw-r--r-- | alot/__main__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/alot/__main__.py b/alot/__main__.py index 4a52f50b..b55c9999 100644 --- a/alot/__main__.py +++ b/alot/__main__.py @@ -37,7 +37,10 @@ def main(): parser.add_argument('-l', '--logfile', default='/dev/null', type=lambda x: argparse.FileType('w')(x).name, help='logfile [default: %(default)s]') - parser.add_argument('command', nargs=argparse.REMAINDER) + # We will handle the subcommands in a seperate run of argparse as argparse + # does not support optional subcommands until now. + parser.add_argument('command', nargs=argparse.REMAINDER, + help="possible subcommands are 'search' and 'compose'") options = parser.parse_args() if options.command: # We have a command after the initial options so we also parse that. @@ -112,5 +115,6 @@ def main(): if exit_hook is not None: exit_hook() + if __name__ == "__main__": main() |