diff --git a/bin/is b/bin/is index ce7cf9b40b1f813178aa54199b417fbc0e9d101d..311c49679f3b1a539e853034e16598e11ad89998 100755 --- a/bin/is +++ b/bin/is @@ -237,7 +237,10 @@ def c_help(parser, args): ''' Show help ''' - parser.print_help() + if args.command is None: + parser.print_help() + else: + args.subparser.choices[args.command].print_help() def c_version(parser, args): ''' @@ -358,7 +361,9 @@ p_clean.set_defaults(func=c_clean) # help command parser p_help = subparsers.add_parser("help", help=c_help.__doc__.lower()) -p_help.set_defaults(func=c_help) +p_help.add_argument("command", choices=subparsers.choices, nargs="?", + help="command name") +p_help.set_defaults(func=c_help, subparser=subparsers) # version command parser p_version = subparsers.add_parser("version", help=c_version.__doc__.lower())