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=}"