mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2024-11-16 06:28:32 -06:00
add some help docs
This commit is contained in:
parent
a57d4ee687
commit
0375acc677
1 changed files with 9 additions and 4 deletions
|
@ -121,11 +121,16 @@ proc bb*(cli: HwylCliHelp): BbString =
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
|
|
||||||
type
|
type
|
||||||
Count* = object
|
Count* = object ## Count type for an incrementing flag
|
||||||
val*: int
|
val*: int
|
||||||
|
|
||||||
CliSetting = enum
|
type
|
||||||
NoHelpFlag, ShowHelp, NoNormalize
|
# ----
|
||||||
|
CliSetting* = enum
|
||||||
|
NoHelpFlag, ## Remove the builtin help flag
|
||||||
|
ShowHelp, ## If cmdline empty show help
|
||||||
|
NoNormalize ## Don't normalize flags and commands
|
||||||
|
|
||||||
BuiltinFlag = object
|
BuiltinFlag = object
|
||||||
name*: string
|
name*: string
|
||||||
short*: char
|
short*: char
|
||||||
|
@ -480,7 +485,7 @@ func subCmdsArray(cfg: CliCfg): NimNode =
|
||||||
result.add quote do:
|
result.add quote do:
|
||||||
(`cmd`, `desc`)
|
(`cmd`, `desc`)
|
||||||
|
|
||||||
proc hwylCliError*(msg: string | BbString) =
|
proc hwylCliError*(msg: string | BbString) =
|
||||||
quit $(bb("error ", "red") & bb(msg))
|
quit $(bb("error ", "red") & bb(msg))
|
||||||
|
|
||||||
func defaultUsage(cfg: CliCfg): NimNode =
|
func defaultUsage(cfg: CliCfg): NimNode =
|
||||||
|
|
Loading…
Reference in a new issue