Bugfix: handle arguments to sub-commands properly

This commit is contained in:
Zahary Karadjov 2019-10-31 19:58:49 +02:00
parent d9e815fe67
commit 0e42c65951
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ proc showHelp(appInfo: HelpAppInfo, activeCmds: openarray[CmdInfo]) =
func getNextArgIdx(cmd: CmdInfo, consumedArgIdx: int): int =
for i in consumedArgIdx + 1 ..< cmd.opts.len:
if cmd.opts[i].kind == Arg:
return i
return cmd.opts[i].idx
return -1