diff options
-rw-r--r-- | build-app.lisp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/build-app.lisp b/build-app.lisp index 044ae8a..ca1c83f 100644 --- a/build-app.lisp +++ b/build-app.lisp @@ -58,6 +58,18 @@ Finally, you can MIX POSITIONAL AND NAMED VARIABLES so long as, when you run the oneliner, all positional variables appear first. ") +(defparameter +configure-your-edtior+ + "Adding explainations for oneliners, either with --add or --edit, +will use a default system editor. If you do not like the default +editor you may configure it by the exporting the EDITOR environment +variable to whatever you prefer. + +E.g. in your .bashrc you might put + +export EDITOR=/usr/bin/zile + +") + ;;; CLON SYNOPSIS DEFINITION @@ -104,10 +116,12 @@ you run the oneliner, all positional variables appear first. (flag :long-name "whois" :description "View information about a contributor. The first argument is a contributor handle.") (flag :long-name "help" - :description "Print help for a topic. Topics: wiki, account, invites, variables")) + :description "Print help for a topic. Topics: wiki, account, invites, variables, editor")) (group (:header "Advanced Options" :hidden t) (flag :long-name "clear-cache" :description "Clears all cached search results from your system.")) + (group (:header "Editor" :hidden t) + (text :contents +configure-your-edtior+)) (group (:header "Variables" :hidden t) (text :contents +oneliners-variables-help-text+)) (group (:header "Wiki" :hidden t) @@ -169,12 +183,14 @@ than the users." (defun main () "Entry point for our standalone application." (make-context) - (a:when-let (topic (getopt :long-name "help")) - (help :item (find-group-with-header (symbol-name topic))) - (uiop:quit)) (handler-case (let ((arguments (remainder))) (cond + ((getopt :long-name "help") + (if (and arguments (find-group-with-header (first arguments))) + (help :item (find-group-with-header (first arguments))) + (help)) + (uiop:quit)) ((getopt :long-name "whois") (assert (first arguments) () "--whois requires an argument, a user handle.") (cli::show-contributor (first arguments))) |