Hi,
A very simplified tools.cli call:
(let [cli-opts [["-m" "--mode MODE" "Application mode"]]]
(cli/parse-opts ["-m" "hub"] cli-opts))
Evaluates as expected to:
{:options {:mode "hub"} ... }
However, when I try to replace the long option with nil per the docs:
(let [cli-opts [["-m" nil "Application mode" :id :mode]]]
(cli/parse-opts ["-m" "hub"] cli-opts))
I get:
{:options {:mode true} :arguments ["hub"] ... }
I get the same behaviour with long option = "", "--mode", and "MODE"; the only way it seems to work is with the full "--mode MODE". Setting the short option to nil works as I'd expect.
Tested in Clojure 1.12.0, tools.cli 1.1.230, Java 23; same behaviour on Windows 11 and MacOS 15.
Am I doing something wrong, or is tools.cli? :)