aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/command_line
diff options
context:
space:
mode:
authorChouser <chouser@n01se.net>2008-11-12 22:28:07 +0000
committerChouser <chouser@n01se.net>2008-11-12 22:28:07 +0000
commit72a13bf2d0988100f8a8526b8919acd262f5b204 (patch)
treeb71aaf39d386674d77cf576aae6e9661f6896b43 /src/clojure/contrib/command_line
parent3fccec183e820a9730d2fe36ef016f80c1a7bbc7 (diff)
command-line: print help when no command-line options are given
Diffstat (limited to 'src/clojure/contrib/command_line')
-rw-r--r--src/clojure/contrib/command_line/command_line.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clojure/contrib/command_line/command_line.clj b/src/clojure/contrib/command_line/command_line.clj
index 3bc620f4..ab2349d5 100644
--- a/src/clojure/contrib/command_line/command_line.clj
+++ b/src/clojure/contrib/command_line/command_line.clj
@@ -5,7 +5,7 @@
(let [{specs true [rest-name] false} (su/group-by vector? cmdspec)
names (assoc (into {} (for [[n txt d] specs] [(str n) d]))
"help?" nil)]
- (loop [[argkey & [argval :as r]] args
+ (loop [[argkey & [argval :as r]] (if (seq args) args ["--help"])
cmdmap {:cmdspec cmdspec rest-name []}]
(if argkey
(let [[_ & [keybase]] (re-find #"^--?(.*)" argkey)]