mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2025-02-23 01:35:50 -06:00
help should be a const
This commit is contained in:
parent
bf542a1470
commit
2bb4463f58
1 changed files with 3 additions and 5 deletions
|
@ -941,7 +941,7 @@ func flagToTuple(c: CliCfg, f: CliFlag): NimNode =
|
|||
else:
|
||||
let val = f.defaultVal
|
||||
quote do:
|
||||
bbEscape($`val`)
|
||||
bbEscape($(`val`))
|
||||
|
||||
required = newLit(c.isRequiredFlag(f))
|
||||
typeNode =
|
||||
|
@ -964,9 +964,7 @@ func flagToTuple(c: CliCfg, f: CliFlag): NimNode =
|
|||
defaultVal,
|
||||
required,
|
||||
)
|
||||
# quote do:
|
||||
# (`short`, `long`, `help`, bbEscape($`defaultVal`), `required`)
|
||||
#
|
||||
|
||||
func flagsArray(cfg: CliCfg): NimNode =
|
||||
result = newTree(nnkBracket)
|
||||
for f in cfg.flags:
|
||||
|
@ -1020,7 +1018,7 @@ func generateCliHelpProc(cfg: CliCfg, printHelpName: NimNode): NimNode =
|
|||
|
||||
result = quote do:
|
||||
proc `printHelpName`() =
|
||||
const help =
|
||||
let help =
|
||||
newHwylCliHelp(
|
||||
header = `header`,
|
||||
footer = `footer`,
|
||||
|
|
Loading…
Add table
Reference in a new issue