We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4c6bc5 commit c597792Copy full SHA for c597792
1 file changed
src/net/lewisship/cli_tools.clj
@@ -170,16 +170,12 @@
170
;; it can also be a map with key :options
171
test-mode?# (impl/command-map? args#)
172
command-spec# ~(select-keys parsed-interface parse-cli-keys)]
173
+ ;; introspection mode is used primarily by completions; it invokes the function with no arguments
174
+ ;; (but with the flag on) and the command-spec is returned, from which completions are generated.
175
(if impl/*introspection-mode*
176
command-spec#
- (let [~command-map-symbol (cond
- test-mode?#
177
+ (let [~command-map-symbol (if test-mode?#
178
{:options (first args#)}
-
179
- impl/*introspection-mode*
180
- command-spec#
181
182
- :else
183
(impl/parse-cli ~command-name'
184
~docstring
185
args#
0 commit comments