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:
|
when isMainModule:
|
||||||
import std/strformat
|
import std/strformat
|
||||||
|
|
||||||
hwylCli:
|
hwylCli:
|
||||||
name "hwylterm"
|
name "hwylterm"
|
||||||
... "a description of hwylterm"
|
... "a description of hwylterm"
|
||||||
globalFlags:
|
|
||||||
config:
|
|
||||||
T seq[string]
|
|
||||||
? "path to config file"
|
|
||||||
* @["config.yml"]
|
|
||||||
flags:
|
flags:
|
||||||
check:
|
check:
|
||||||
T bool
|
T bool
|
||||||
? "load config and exit"
|
? "load config and exit"
|
||||||
- c
|
- c
|
||||||
|
# --- other
|
||||||
|
config:
|
||||||
|
T seq[string]
|
||||||
|
? "path to config file"
|
||||||
|
* @["config.yml"]
|
||||||
|
# ^ other
|
||||||
run:
|
run:
|
||||||
echo "hello from the main command"
|
echo "hello from the main command"
|
||||||
echo fmt"{config=}, {check=}"
|
echo fmt"{config=}, {check=}"
|
||||||
|
@ -743,6 +745,7 @@ when isMainModule:
|
||||||
--- a
|
--- a
|
||||||
... "the \"a\" subcommand"
|
... "the \"a\" subcommand"
|
||||||
flags:
|
flags:
|
||||||
|
# ^ other
|
||||||
`long-flag` "some help"
|
`long-flag` "some help"
|
||||||
flagg "some other help"
|
flagg "some other help"
|
||||||
run:
|
run:
|
||||||
|
|
1
todo.md
1
todo.md
|
@ -17,6 +17,7 @@
|
||||||
### cli generato
|
### cli generato
|
||||||
|
|
||||||
- [ ] add support for types(metavars)/defaults/required in help output
|
- [ ] 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`
|
- [ ] abstract the `globalFlags` argument to a `flagGroups` section with a builtin `global`
|
||||||
this would allow users to "inherit" flag groups in subcommands
|
this would allow users to "inherit" flag groups in subcommands
|
||||||
```nim
|
```nim
|
||||||
|
|
Loading…
Reference in a new issue