Question for tool authors: Do you use org.clojure/tools.cli? Do you use :in-order true for subcommand handling, or perhaps wish there was more flexibility there?
In response to https://ask.clojure.org/index.php/14977/tools-cli-capture-unrecognized-options-unparsed-arguments I've made some changes on the master branch that I'd like some feedback on and some testing too:
β’ Introduce :subcommand option:
β’ :subcommand :explicit is equivalent to :in-order true (which is now deprecated): everything from the first non-option onward is considered a subcommand, so git --git-dir=/other/proj/.git log --oneline --graph parses to options: [[--git-dir /other/proj/.git]], arguments: [log --oneline --graph]
β’ :subcommand :implicit similar but also treats an unknown option as starting a subcommand, without requiring an explicit non-option subcommand (this specifically addresses the Ask)
Feedback in a π§΅ please...
You can use git deps to test it out: org.clojure/tools.cli {:git/url "
For background, the Ask is a change that @hlship first started discussing with me back in 2024 as something he needed for the tools he was writing. He just hadn't written it up until I nagged him recently π
Surely it was a βjog my memory β not a βnagβ