add default for subcommands

This commit is contained in:
Daylin Morgan 2024-11-06 23:14:43 -06:00
parent a4e0f3fc7b
commit 372ba3c644
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -444,7 +444,7 @@ func subCmdsArray(cfg: CliCfg): NimNode =
result = newTree(nnkBracket)
for s in cfg.subcommands:
let cmd = newLit(s.subName)
let desc = s.desc
let desc = s.desc or newLit("")
result.add quote do:
(`cmd`, `desc`)