Closed lread closed 4 years ago
I think this might be a better approach than #95, but each has its pros and cons.
clojure.tools.cli
internals which were formerly a black box for cli-matic.These 2 PRs do share some common changes, to see what is different between them here's comparison of 95 vs 95.
I'll let you decide which to merge and which to reject.
Hi @l3nz, is there anything more you'd like me to do on this?
An alternative would be to propose a change to https://github.com/clojure/tools.cli itself. I expect the specification of multiline values as vectors would remain in the domain of cli-matic, but clojure.tools.cli
could be altered to handle newlines in options.
The value for :as acts as an option's description. Like the :app and :command :description, :as now optionally supports multiline text via a vector of strings.
Notes: Cli-matic takes advantage of clojure.tools.cli to format options for display in help. Ideally clojure.tools.cli would accept multiline descriptions for options, but it does not.
We take advantage of clojure.tools.cli's :summary-fn to override default handling and support multilines.
This work includes the strengthening of the spec for descriptions. A description must be a non-blank string - or - a collection of strings that includes at least one non-blank string.
I also moved the beef of get-clojure-options under utils to localize interactions with clojure.tools.cli
Fixes #94