Hello everyone, I am happy to announce the beta release of the next version of clojure.tools.cli:
https://github.com/clojure/tools.cli#new-features
Leiningen dependency information:
[org.clojure/tools.cli "0.3.0-beta1"]
Maven dependency information:
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.cli</artifactId>
<version>0.3.0-beta1</version>
</dependency>
The project README linked above has the details, but here is a summary:
* There is a new function, clojure.tools.cli/parse-opts, that supports
- GNU option conventions (`-abc` -> `-a -b -c`, `--long-opt=ARG`)
- In-order argument processing (for separate subcommand options)
- Option argument validations
- Custom option summaries
- Error handling without throwing exceptions
* tools.cli now ships with a ClojureScript namespace:
cljs.tools.cli
parse-opts has been ported to CLJS with feature parity.
* The previous function, clojure.tools.cli/cli, has been adapted to
use the new option tokenizer, but otherwise remains unchanged.
Upgrading is therefore encouraged even if you do not plan on
migrating to parse-opts.
Though it has been superseded, cli/cli will not be removed in the
forseeable future.
My goal with this new version is to convince application and library
authors to choose tools.cli/parse-opts over hand-rolled parsers!
In pursuit of this, I welcome feedback from the community so we can make
amendments before a final release.
Finally, I would like to express sincere thanks to Gareth Jones for
giving me the opportunity to contribute to the tools.cli project.
Cheers,
Sung Pae
pgpXoqWmJQKEz.pgp
Description: PGP signature
