I frequently write a command that accepts options and in turn execute a shell command passing arguments through; I want to be able to specify additional arguments to that shell command.
In tools.cli, the :in-order key almost does what i want:
`
(require '[clojure.tools.cli :as cli])
=> nil
(def opts [["-d" "--debug"]])
=> #'net.lewisship.cli-tools-test/opts
(cli/parse-opts
["--foo"]
[]
:in-order true)
=> {:options {}, :arguments [], :summary "", :errors ["Unknown option: \"--foo\""]}
(cli/parse-opts
["xxx" "--foo"]
[]
:in-order true)
=> {:options {}, :arguments ["xxx" "--foo"], :summary "", :errors nil}
`
However, it will assume an undefined option is an error until the first non-option argument is consumed.
I would like a further option that is like :in-order but accepting of these unrecognized options. Maybe, :passthru-options would be a good name?
I can work on a patch if we have some consensus on direction.