Support command like this: $collie command subcommand sub-subcommand arg1 arg2 Signed-off-by: Kai Zhang <kyle at zelin.io> --- collie/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/collie/common.c b/collie/common.c index 8dacbd4..2b08db1 100644 --- a/collie/common.c +++ b/collie/common.c @@ -225,7 +225,7 @@ int do_generic_subcommand(struct subcommand *sub, int argc, char **argv) } if (flags & SUBCMD_FLAG_NEED_ARG - && argc != 5) + && argc < 5) subcommand_usage(argv[1], argv[2], EXIT_USAGE); optind++; ret = sub[i].fn(argc, argv); -- 1.7.1 |