make sure that aliases are included in stopWords

This commit is contained in:
Daylin Morgan 2024-11-13 09:42:57 -06:00
parent 9e35d4ea12
commit de798fff70
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -394,17 +394,16 @@ func inheritFrom(child: var CliCfg, parent: CliCfg) =
else:
child.flags &= pgroups[g]
func parseCliSubcommands(cfg: var CliCfg, node: NimNode) =
expectKind node[1], nnkStmtList
for (name, s) in sliceStmts(node[1]):
cfg.stopWords.add name
var subCfg = parseCliBody(
nnkStmtList.newTree(node[1][s]), cfg.name & " " & name
)
subCfg.subName = name
subCfg.inheritFrom(cfg)
cfg.stopWords.add name
cfg.stopWords.add subCfg.alias.toSeq()
cfg.subcommands.add subCfg
func parseHiddenFlags(cfg: var CliCfg, node: NimNode) =