     (.delete (file plugins-path
                (plugin-standalone-filename group name version)))))
 
+;; TODO: move subtask documentation support to help namespace.
 (defn- formatted-docstring [command docstring padding]
   (apply str
     (replace

        [(str (:name (meta subtask))) (:doc (meta subtask))])
      [#'help #'install #'uninstall])))

(defn help
  "Show plugin subtasks"
  []
  (let [help-map (get-help-map)
        longest-key-length (apply max (map count (keys help-map)))]
    (println (str "Plugin tasks available:\n"))
    (doall (map
             (fn [[k v]] (println (formatted-help k v longest-key-length)))
             help-map))
    (println)))


(defn plugin
  ([] (help))
  ([_] (help))
  ([_ _] (help))
  ([subtask project-name version]
    (case subtask
      "install" (install project-name version)
      "uninstall" (uninstall project-name version)
      (help))))


                              extract-jar
                              get-default-uberjar-name)]
        [clojure.java.io :only (file)])
  (:require [leiningen.install]
            [clojure.string :as string])
  (:import [java.util.zip ZipOutputStream]
           [java.io File FileOutputStream]))

