<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -56,7 +56,7 @@
     &quot;clojurescript.cli -- Compile ClojureScript to JavaScript&quot;
     [[simple? &quot;Runs some simple built-in tests&quot;]
      [mkcore? &quot;Generates a core.js file&quot;]
-     [v?      &quot;Includes extra fn names and comments in js&quot;]
+     [v? verbose? &quot;Includes extra fn names and comments in js&quot;]
      filenames]
     (cond
       simple? (simple-tests)</diff>
      <filename>clojurescript/src/clojure/contrib/clojurescript/cli.clj</filename>
    </modified>
    <modified>
      <diff>@@ -13,33 +13,28 @@
     (:use     (clojure.contrib [str-utils :only (str-join)])))
 
 (defn make-map [args cmdspec]
-  (let [{specs true [rest-name] false} (su/group-by vector? cmdspec)
-         names (assoc (into {} (for [spec specs] 
-                                 (let [[syms [desc default]] 
-                                          (split-with symbol? spec)]
-                                    [(set (map str syms))
-                                       {:sym (first syms) :default default}])))
-                  #{&quot;help?&quot; &quot;h?&quot;} {:sym 'help? :default false})
-         allnames 
-               (reduce clojure.set/union (keys names))
-         get-found (fn [keybase] (some #(and ((key %) keybase) (val %)) names))] 
+  (let [{spec true [rest-sym] false} (su/group-by vector? cmdspec)
+        rest-str (str rest-sym)
+        key-data (into {} (for [[syms [_ default]] (map #(split-with symbol? %)
+                                                        (conj spec '[help? h?]))
+                                sym syms]
+                            [(re-find #&quot;^.*[^?]&quot; (str sym))
+                             {:sym (str (first syms)) :default default}]))]
     (loop [[argkey &amp; [argval :as r]] (if (seq args) args [&quot;--help&quot;])
-           cmdmap {:cmdspec cmdspec rest-name []}]
+           cmdmap {:cmdspec cmdspec rest-str []}]
       (if argkey
         (let [[_ &amp; [keybase]] (re-find #&quot;^--?(.*)&quot; argkey)]
           (cond
-            (= keybase nil) (recur r (update-in cmdmap [rest-name] conj argkey))
-            (= keybase &quot;&quot;)  (update-in cmdmap [rest-name] #(apply conj % r))
-            (allnames keybase)
-               (let [found (get-found keybase)]
-                 (recur (rest r) (assoc cmdmap (:sym found)
-                                        (if (or (nil? r) (= \- (ffirst r)))
-                                          (:default found)
-                                          (first r)))))
-            (allnames (str keybase &quot;?&quot;))
-               (let [found (get-found (str keybase &quot;?&quot;))]
-                 (recur r (assoc cmdmap (:sym found) true)))
-            :else (throw (Exception. (str &quot;Unknown option &quot; argkey)))))
+            (= keybase nil) (recur r (update-in cmdmap [rest-str] conj argkey))
+            (= keybase &quot;&quot;)  (update-in cmdmap [rest-str] #(apply conj % r))
+            :else (if-let [found (key-data keybase)]
+                    (if (= \? (last (:sym found)))
+                      (recur r (assoc cmdmap (:sym found) true))
+                      (recur (rest r) (assoc cmdmap (:sym found)
+                                             (if (or (nil? r) (= \- (ffirst r)))
+                                               (:default found)
+                                               (first r)))))
+                    (throw (Exception. (str &quot;Unknown option &quot; argkey))))))
         cmdmap))))
 
 (defn- align
@@ -94,8 +89,8 @@
                       (if (vector? spec)
                         (first spec)
                         spec)))]
-    `(let [{:syms ~locals :as cmdmap#} (make-map ~args '~cmdspec)]
-       (if (cmdmap# '~'help?)
+    `(let [{:strs ~locals :as cmdmap#} (make-map ~args '~cmdspec)]
+       (if (cmdmap# &quot;help?&quot;)
          (print-help ~desc cmdmap#)
          (do ~@body)))))
 </diff>
      <filename>src/clojure/contrib/command_line.clj</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1c9a8c6ab84098107b89562f1100c41490f37692</id>
    </parent>
  </parents>
  <author>
    <name>Chouser</name>
    <email>chouser@n01se.net</email>
  </author>
  <url>http://github.com/richhickey/clojure-contrib/commit/74403acd6116d2048a3c2e78c9f9e51ef5229389</url>
  <id>74403acd6116d2048a3c2e78c9f9e51ef5229389</id>
  <committed-date>2009-02-01T09:42:53-08:00</committed-date>
  <authored-date>2009-02-01T09:42:53-08:00</authored-date>
  <message>command-line: simplified the cmdspec parsing code a bit.</message>
  <tree>14175ef6806193bb2c4da7223c7e3eaa30dc945d</tree>
  <committer>
    <name>Chouser</name>
    <email>chouser@n01se.net</email>
  </committer>
</commit>
