 (ns ^{:author "Gareth Jones, Sung Pae"}
   clojure.tools.cli
-  (:use [clojure.string :as s :only [replace]]
-        [clojure.pprint :only [cl-format]])
-  (:refer-clojure :exclude [replace]))
+  (:require [clojure.pprint :as pp]
+            [clojure.string :as s]))
 
 (defn- tokenize-args
   "Reduce arguments sequence into [opt-type opt ?optarg?] vectors and a vector

     :arguments   A vector of unprocessed arguments
     :summary     A string containing a minimal options summary
     :errors      A possible vector of error message strings generated during
                  parsing; nil when no errors exist
     }

  A few function options may be specified to influence the behavior of
  parse-opts:

        vs (for [d docs]
             (mapcat (fn [& x] (apply vector x)) max-cols d))]
    (doseq [v vs]
      (pp/cl-format true "~{ ~vA  ~vA  ~vA ~}" v)
      (prn))))

(defn- name-for [k]
  (s/replace k #"^--no-|^--\[no-\]|^--|^-" ""))

(defn- flag-for [^String v]
  (not (.startsWith v "--no-")))
