11< html >
22 < head >
33 < meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 " />
4- < title > clojure.tools.cli - tools.cli 1.0.220 -SNAPSHOT API documentation</ title >
4+ < title > clojure.tools.cli - tools.cli 1.3.251 -SNAPSHOT API documentation</ title >
55 < link rel ="icon " href ="static/favicon.png " />
66 < link rel ="shortcut icon " href ="static/favicon.png " />
77 < link rel ="stylesheet " href ="static/clojure.css " type ="text/css " media ="all " />
@@ -25,7 +25,7 @@ <h1><a href="index.html" id="page-header" title="page header title">tools.cli AP
2525 < div id ="leftcolumn "> < div style ="text-align: center; "> </ div >
2626< div class ="menu ">
2727 < div class ="WikiCustomNav WikiElement wiki ">
28- < span class ="toc-header "> < span id ="project-name "> tools.cli</ span > < span id ="version "> 1.0.220 -SNAPSHOT</ span > API</ span > < br />
28+ < span class ="toc-header "> < span id ="project-name "> tools.cli</ span > < span id ="version "> 1.3.251 -SNAPSHOT</ span > API</ span > < br />
2929 < ul >
3030 < li > < a href ="index.html " class ="wiki_link "> Overview</ a > </ li >
3131 < li > < a href ="api-index.html " class ="wiki_link "> API Index</ a > </ li >
@@ -79,7 +79,7 @@ <h1 class="nopad">Table of Contents</h1>
7979</ div >
8080</ div >
8181 < div id ="content-tag "> < h1 id ="overview "> API for < span id ="clojure.tools.cli "> clojure.tools.cli</ span >
82- - < span id ="header-project "> tools.cli</ span > < span id ="header-version "> 1.0.220 -SNAPSHOT</ span > < span id ="header-status-block "> (< span id ="header-status "> in development</ span > )</ span >
82+ - < span id ="header-project "> tools.cli</ span > < span id ="header-version "> 1.3.251 -SNAPSHOT</ span > < span id ="header-status-block "> (< span id ="header-status "> in development</ span > )</ span >
8383 </ h1 >
8484< span id ="author-line "> by < span id ="author-name "> Gareth Jones, Sung Pae, Sean Corfield</ span > < br /> </ span >
8585< br /> Full namespace name: < span id ="long-name "> clojure.tools.cli</ span >
@@ -103,7 +103,7 @@ <h2 id="clojure.tools.cli/cli">cli</h2>
103103 < span id ="var-type "> function</ span > < br />
104104 < pre id ="var-usage "> Usage: (cli args & specs)
105105</ pre >
106- < pre id ="var-docstr "> THIS IS A LEGACY FUNCTION and may be deprecated in the future . Please use
106+ < pre id ="var-docstr "> THIS IS A LEGACY FUNCTION and is deprecated. Please use
107107clojure.tools.cli/parse-opts in new applications.
108108
109109Parse the provided args using the given specs. Specs are vectors
@@ -123,8 +123,8 @@ <h2 id="clojure.tools.cli/cli">cli</h2>
123123documentation banner to provide usage instructions.</ pre >
124124 < pre id ="var-specs "> </ pre >
125125
126-
127- < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/a206f00b0bd2da4b40e3d7ce9510bdc5019a7928 /src/main/clojure/clojure/tools/cli.cljc#L206 "> Source</ a >
126+ < span class =" var-deprecated " > < span id =" content " > Deprecated since tools.cli version since 0.4.x </ span > < br /> </ span >
127+ < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/187dd20e4bbe624ef9187d3a7e883687ebc478a2 /src/main/clojure/clojure/tools/cli.cljc#L775 "> Source</ a >
128128 </ div > < div id ="var-entry ">
129129 < br />
130130 < hr />
@@ -137,9 +137,9 @@ <h2 id="clojure.tools.cli/format-lines">format-lines</h2>
137137not displaying defaults. There are three sequences of lengths if we
138138are showing defaults.</ pre >
139139 < pre id ="var-specs "> </ pre >
140- < span class ="var-added "> < span id ="content "> Added in tools.cli version 0.3.0</ span > < br /> </ span >
141140
142- < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/a206f00b0bd2da4b40e3d7ce9510bdc5019a7928/src/main/clojure/clojure/tools/cli.cljc#L522 "> Source</ a >
141+
142+ < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/187dd20e4bbe624ef9187d3a7e883687ebc478a2/src/main/clojure/clojure/tools/cli.cljc#L371 "> Source</ a >
143143 </ div > < div id ="var-entry ">
144144 < br />
145145 < hr />
@@ -151,9 +151,9 @@ <h2 id="clojure.tools.cli/get-default-options">get-default-options</h2>
151151
152152As of 0.4.1, this also applies any :default-fn present.</ pre >
153153 < pre id ="var-specs "> </ pre >
154- < span class ="var-added "> < span id ="content "> Added in tools.cli version 0.3.2</ span > < br /> </ span >
155154
156- < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/a206f00b0bd2da4b40e3d7ce9510bdc5019a7928/src/main/clojure/clojure/tools/cli.cljc#L555 "> Source</ a >
155+
156+ < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/187dd20e4bbe624ef9187d3a7e883687ebc478a2/src/main/clojure/clojure/tools/cli.cljc#L404 "> Source</ a >
157157 </ div > < div id ="var-entry ">
158158 < br />
159159 < hr />
@@ -164,9 +164,9 @@ <h2 id="clojure.tools.cli/make-summary-part">make-summary-part</h2>
164164 < pre id ="var-docstr "> Given a single compiled option spec, turn it into a formatted string,
165165optionally with its default values if requested.</ pre >
166166 < pre id ="var-specs "> </ pre >
167- < span class ="var-added "> < span id ="content "> Added in tools.cli version 0.3.0</ span > < br /> </ span >
168167
169- < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/a206f00b0bd2da4b40e3d7ce9510bdc5019a7928/src/main/clojure/clojure/tools/cli.cljc#L498 "> Source</ a >
168+
169+ < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/187dd20e4bbe624ef9187d3a7e883687ebc478a2/src/main/clojure/clojure/tools/cli.cljc#L347 "> Source</ a >
170170 </ div > < div id ="var-entry ">
171171 < br />
172172 < hr />
@@ -204,7 +204,7 @@ <h2 id="clojure.tools.cli/parse-opts">parse-opts</h2>
204204 transform a value in different ways, but only one of these
205205 option entries may contain a :default(-fn) entry.
206206
207- This option is mandatory.
207+ This option is mandatory if no long option is provided .
208208
209209 :short-opt The short format for this option, normally set by the first
210210 positional string parameter: e.g. "-p". Must be unique.
@@ -214,7 +214,8 @@ <h2 id="clojure.tools.cli/parse-opts">parse-opts</h2>
214214
215215 :required A description of the required argument for this option if
216216 one is required; normally set in the second positional
217- string parameter after the long option: "--port PORT".
217+ string parameter after the long option: "--port PORT",
218+ which would be equivalent to :required "PORT".
218219
219220 The absence of this entry indicates that the option is a
220221 boolean toggle that is set to true when specified on the
@@ -353,10 +354,6 @@ <h2 id="clojure.tools.cli/parse-opts">parse-opts</h2>
353354A few function options may be specified to influence the behavior of
354355parse-opts:
355356
356- :in-order Stop option processing at the first unknown argument. Useful
357- for building programs with subcommands that have their own
358- option specs.
359-
360357 :no-defaults Only include option values specified in arguments and do not
361358 include any default values in the resulting options map.
362359 Useful for parsing options from multiple sources; i.e. from a
@@ -366,14 +363,21 @@ <h2 id="clojure.tools.cli/parse-opts">parse-opts</h2>
366363 matches any other option, it is considered to be missing (and
367364 you have a parse error).
368365
366+ :subcommand Stop option processing at the first unknown argument. Useful
367+ for building programs with subcommands that have their own
368+ option specs. Can be set to :explicit or :implicit. :explicit
369+ requires a non-option (explicit) subcommand argument to
370+ trigger collection of subcommand arguments. :implicit treats an
371+ unknown option as starting a new subcommand.
372+
369373 :summary-fn A function that receives the sequence of compiled option specs
370374 (documented at #'clojure.tools.cli/compile-option-specs), and
371375 returns a custom option summary string.
372376</ pre >
373377 < pre id ="var-specs "> </ pre >
374- < span class ="var-added "> < span id ="content "> Added in tools.cli version 0.3.0</ span > < br /> </ span >
375378
376- < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/a206f00b0bd2da4b40e3d7ce9510bdc5019a7928/src/main/clojure/clojure/tools/cli.cljc#L570 "> Source</ a >
379+
380+ < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/187dd20e4bbe624ef9187d3a7e883687ebc478a2/src/main/clojure/clojure/tools/cli.cljc#L418 "> Source</ a >
377381 </ div > < div id ="var-entry ">
378382 < br />
379383 < hr />
@@ -387,9 +391,9 @@ <h2 id="clojure.tools.cli/summarize">summarize</h2>
387391you get back a :summary key which is the result of calling summarize (or
388392your user-supplied :summary-fn option) on the compiled option specs.</ pre >
389393 < pre id ="var-specs "> </ pre >
390- < span class ="var-added "> < span id ="content "> Added in tools.cli version 0.3.0</ span > < br /> </ span >
391394
392- < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/a206f00b0bd2da4b40e3d7ce9510bdc5019a7928/src/main/clojure/clojure/tools/cli.cljc#L539 "> Source</ a >
395+
396+ < a id ="var-source " href ="https://github.com/clojure/tools.cli/blob/187dd20e4bbe624ef9187d3a7e883687ebc478a2/src/main/clojure/clojure/tools/cli.cljc#L388 "> Source</ a >
393397 </ div >
394398</ div >
395399
0 commit comments