File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## Added
44
5+ - Allow a command spec to be just a function
6+
57## Fixed
68
7- ## Changed
9+ - Preserve command order in help text when using a vector
810
911# 0.4.24 (2024-02-17 / 5a1e316)
1012
@@ -60,4 +62,4 @@ approaching the envisioned scope for this library.
6062
6163- subcommand handling
6264- rudimentary flag handling
63- - help text generation
65+ - help text generation
Original file line number Diff line number Diff line change 164164 (var? ?var)
165165 (assoc (meta ?var) :command ?var)
166166
167+ (fn? ?var)
168+ {:command ?var}
169+
167170 (var? (:command ?var))
168171 (merge (meta (:command ?var)) ?var)
169172
170173 :else
171174 ?var))
172175
173176(defn prepare-cmdpairs [commands]
174- (let [m (if (vector? commands) (apply hash-map commands) commands)]
177+ (let [m (if (vector? commands) (partition 2 commands) commands)]
175178 (map (fn [[k v]]
176179 (let [v (to-cmdspec v)
177180 [[cmd] doc argnames] (parse-arg-names k)]
You can’t perform that action at this time.
0 commit comments