diff options
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() |