From 9afc339a9791f25010ea89a4f52204ad8eeda858 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 18 Sep 2024 14:28:40 -0500 Subject: [PATCH] add a use that doesn't do anything --- src/hwylterm/cli.nim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hwylterm/cli.nim b/src/hwylterm/cli.nim index 840f32e..3d71f36 100644 --- a/src/hwylterm/cli.nim +++ b/src/hwylterm/cli.nim @@ -35,21 +35,23 @@ proc helpAttrOff(): Table[string,string] = "args" : resetCode, }.toTable() + proc hwylCli*( clcfg: var ClCfg, styles: CligenStyle = CligenStyle(), useMulti: string = "${doc}[bold]Usage[/]:\n $command {SUBCMD} [[sub-command options & parameters]\n\n[bold]subcommands[/]:\n$subcmds", - useHdr: string = "[bold]usage[/]:\n " + useHdr: string = "[bold]usage[/]:\n ", + use: string = "$command $args\n${doc}[bold]Options[/]:\n$options" ) = if clCfg.useMulti == "": clCfg.useMulti = $bb(useMulti) - if clCfg.helpAttr.len == 0: clCfg.helpAttr = styles.helpAttr() clCfg.helpAttrOff = helpAttrOff() - - # clCfg.use does nothing? + # this currently has no effect + if clCfg.use == "": + clCfg.use = $bb(use) if clCfg.useHdr == "": clCfg.useHdr = $bb(useHdr)