mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2024-11-16 06:28:32 -06:00
add todo
This commit is contained in:
parent
16cc0b910d
commit
7f53ef5df9
2 changed files with 10 additions and 6 deletions
|
@ -723,19 +723,21 @@ macro hwylCli*(body: untyped) =
|
|||
|
||||
when isMainModule:
|
||||
import std/strformat
|
||||
|
||||
hwylCli:
|
||||
name "hwylterm"
|
||||
... "a description of hwylterm"
|
||||
globalFlags:
|
||||
config:
|
||||
T seq[string]
|
||||
? "path to config file"
|
||||
* @["config.yml"]
|
||||
flags:
|
||||
check:
|
||||
T bool
|
||||
? "load config and exit"
|
||||
- c
|
||||
# --- other
|
||||
config:
|
||||
T seq[string]
|
||||
? "path to config file"
|
||||
* @["config.yml"]
|
||||
# ^ other
|
||||
run:
|
||||
echo "hello from the main command"
|
||||
echo fmt"{config=}, {check=}"
|
||||
|
@ -743,6 +745,7 @@ when isMainModule:
|
|||
--- a
|
||||
... "the \"a\" subcommand"
|
||||
flags:
|
||||
# ^ other
|
||||
`long-flag` "some help"
|
||||
flagg "some other help"
|
||||
run:
|
||||
|
|
1
todo.md
1
todo.md
|
@ -17,6 +17,7 @@
|
|||
### cli generato
|
||||
|
||||
- [ ] add support for types(metavars)/defaults/required in help output
|
||||
- [ ] add support for enum (parse string)
|
||||
- [ ] abstract the `globalFlags` argument to a `flagGroups` section with a builtin `global`
|
||||
this would allow users to "inherit" flag groups in subcommands
|
||||
```nim
|
||||
|
|
Loading…
Reference in a new issue