mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2024-11-16 06:28:32 -06:00
make sure that aliases are included in stopWords
This commit is contained in:
parent
9e35d4ea12
commit
de798fff70
1 changed files with 3 additions and 4 deletions
|
@ -394,17 +394,16 @@ func inheritFrom(child: var CliCfg, parent: CliCfg) =
|
||||||
else:
|
else:
|
||||||
child.flags &= pgroups[g]
|
child.flags &= pgroups[g]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func parseCliSubcommands(cfg: var CliCfg, node: NimNode) =
|
func parseCliSubcommands(cfg: var CliCfg, node: NimNode) =
|
||||||
expectKind node[1], nnkStmtList
|
expectKind node[1], nnkStmtList
|
||||||
for (name, s) in sliceStmts(node[1]):
|
for (name, s) in sliceStmts(node[1]):
|
||||||
cfg.stopWords.add name
|
|
||||||
var subCfg = parseCliBody(
|
var subCfg = parseCliBody(
|
||||||
nnkStmtList.newTree(node[1][s]), cfg.name & " " & name
|
nnkStmtList.newTree(node[1][s]), cfg.name & " " & name
|
||||||
)
|
)
|
||||||
subCfg.subName = name
|
subCfg.subName = name
|
||||||
subCfg.inheritFrom(cfg)
|
subCfg.inheritFrom(cfg)
|
||||||
|
cfg.stopWords.add name
|
||||||
|
cfg.stopWords.add subCfg.alias.toSeq()
|
||||||
cfg.subcommands.add subCfg
|
cfg.subcommands.add subCfg
|
||||||
|
|
||||||
func parseHiddenFlags(cfg: var CliCfg, node: NimNode) =
|
func parseHiddenFlags(cfg: var CliCfg, node: NimNode) =
|
||||||
|
|
Loading…
Reference in a new issue