Skip to content

Commit 6bb1c32

Browse files
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

File tree

.VERSION_PREFIX

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3
1+
0.4

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Unreleased
1+
# 0.4.24 (2024-02-17 / 5a1e316)
22

33
## Added
44

@@ -52,4 +52,4 @@ approaching the envisioned scope for this library.
5252

5353
- subcommand handling
5454
- rudimentary flag handling
55-
- help text generation
55+
- help text generation

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Command line parser with good subcommand and help handling
1414
To use the latest release, add the following to your `deps.edn` ([Clojure CLI](https://clojure.org/guides/deps_and_cli))
1515

1616
```
17-
com.lambdaisland/cli {:mvn/version "0.3.19-alpha"}
17+
com.lambdaisland/cli {:mvn/version "0.4.24"}
1818
```
1919

2020
or add the following to your `project.clj` ([Leiningen](https://leiningen.org/))
2121

2222
```
23-
[com.lambdaisland/cli "0.3.19-alpha"]
23+
[com.lambdaisland/cli "0.4.24"]
2424
```
2525
<!-- /installation -->
2626

0 commit comments

Comments
 (0)