clojure

seancorfield 2026-03-06T20:34:52.058459Z

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...

seancorfield 2026-03-06T20:36:06.837529Z

You can use git deps to test it out: org.clojure/tools.cli {:git/url "" :git/sha "187dd20e4bbe624ef9187d3a7e883687ebc478a2"}

seancorfield 2026-03-07T00:10:32.354319Z

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 πŸ™‚

1
hlship 2026-03-07T07:15:29.763329Z

Surely it was a β€œjog my memory β€œ not a β€œnag”

😁 1