From de798fff70623a2dae97a8925e530891199675ec Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 13 Nov 2024 09:42:57 -0600 Subject: [PATCH] make sure that aliases are included in stopWords --- src/hwylterm/hwylcli.nim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hwylterm/hwylcli.nim b/src/hwylterm/hwylcli.nim index 13060b0..a7ca993 100644 --- a/src/hwylterm/hwylcli.nim +++ b/src/hwylterm/hwylcli.nim @@ -394,18 +394,17 @@ 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.subcommands.add subCfg + cfg.stopWords.add name + cfg.stopWords.add subCfg.alias.toSeq() + cfg.subcommands.add subCfg func parseHiddenFlags(cfg: var CliCfg, node: NimNode) = template check =