Help for a task is stored in its docstring, or if that's not present
in its namespace.
(defn help-for
"Help for a task is stored in its docstring, or if that's not present
in its namespace."
[task]
(let [task-ns (doto (symbol (str "leiningen." task)) require)
task (ns-resolve task-ns (symbol task))]
(str "Arguments: " (pr-str (get-arglists task)) "\n"
(or (:doc (meta task))
(:doc (meta (find-ns task-ns)))))))
Comments top
No comments for help-for. Log in to add a comment.