The closest you can get is this:
clojure.tools.cli=> (parse-opts ["--diff="] [[nil "--diff NAME" "Diff" :parse-fn #(or (not-empty %) "foo")]])
{:options {:diff "foo"}, :arguments [], :summary " --diff NAME Diff", :errors nil}
clojure.tools.cli=> (parse-opts ["--diff=bar"] [[nil "--diff NAME" "Diff" :parse-fn #(or (not-empty %) "foo")]])
{:options {:diff "bar"}, :arguments [], :summary " --diff NAME Diff", :errors nil}
clojure.tools.cli=>
As discussed on Slack, there are reasonable cases for a value-bearing option to want to accept a string that starts with --
or just -
(consider =
to be optional here):
meta-command --option-to-use=--cabbage... \
--divider=--sep-- \
--value=-1