               (if a2
                 (settings-from-args ((k arg-action-map) settings a2) (drop 2 args) errs)
                 (settings-from-args settings (rest args) (conj errs (str "Missing arg for option " a))))
-            (contains? flag-action-map k)
-              (settings-from-args ((k flag-action-map) settings) (rest args) errs)
+            (contains? bool-flag-action-map k)
+              (settings-from-args ((k bool-flag-action-map) settings true) (rest args) errs)
             (= k :settings-file)
               (let [[file-settings file-errs] (settings-from-file settings a2)]
                 (settings-from-args file-settings (drop 2 args) (concat errs file-errs)))

      (cond
        (contains? arg-action-map k)
          (settings-from-map ((k arg-action-map) settings v) (rest ks) m errs)
        (contains? flag-action-map k)
          (settings-from-map ((k bool-flag-action-map) settings v) (rest ks) m errs)
        (= k :startpath)
          (do

    :version (fn [settings b] (assoc settings :version b))
  })

(defn get-long-arg [arg]
  (let [longnames (map :long-arg OPTIONS)
        longmap (zipmap longnames (repeat 1))
