From e8e090c5b76bc555231bda536193df6f92a54db2 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sun, 10 Nov 2024 16:19:44 -0600 Subject: [PATCH] actually use param --- src/hwylterm/hwylcli.nim | 2 +- tests/example.nim | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hwylterm/hwylcli.nim b/src/hwylterm/hwylcli.nim index e189497..97f18b0 100644 --- a/src/hwylterm/hwylcli.nim +++ b/src/hwylterm/hwylcli.nim @@ -408,7 +408,7 @@ func addBuiltinFlags(cfg: var CliCfg) = func parseCliBody(body: NimNode, name = "", root = false): CliCfg = result.name = name - result.root = true + result.root = root for call in body: if call.kind notin [nnkCall, nnkCommand, nnkPrefix]: error "unexpected node kind: " & $call.kind diff --git a/tests/example.nim b/tests/example.nim index 0b2f480..36f205e 100644 --- a/tests/example.nim +++ b/tests/example.nim @@ -45,6 +45,7 @@ hwylCli: ^[config] run: echo "hello from `example one` command!" + echo args echo fmt"{color=}" echo fmt"{verbose=}" echo fmt"{config=}"