Commit 6bb1c32
committed
# 0.4.24 (2024-02-17 / 5a1e316)
## Added
- Bind the options map to `cli/*opts*`, for easy access.
- Show the default for a flag in the help text.
- Add a docstring to the main entry point (`dispatch`)
- Bind `*opts*` during flag handler execution
## Fixed
- Recognize `-` and `\\--foo` as positional args
## Changed
- When given both a `:default` and a `:handler` for a flag, call the handler
with the default, rather than just assoc-ing it.
- When given a string `:default` and a `:parse` function for a flag, run the
default value through the parse function, rather than using it directly. Using
the unparsed string form for the default is preferable over for instance using
a keyword, since it leads to better help text rendering.
- Improve and document the processing logic, especially when it comes to
subcommand flags with handler functions.1 parent 5a1e316 commit 6bb1c32
3 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments