diff options
author | Colin Okay <okay@toyful.space> | 2022-02-17 16:02:25 -0600 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-02-17 16:02:25 -0600 |
commit | ef3741726fcda3962e29110d49b4105a2ac40e50 (patch) | |
tree | bfa249b94bff7e8572bf6f5ea0bf95fb487f7565 /src | |
parent | 9844f6ae2512e7da6910e51c2d0d0f7da1550663 (diff) |
Beginning work on the CLON based CLI parsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.lisp (renamed from src/main.lisp) | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/main.lisp b/src/lib.lisp index 0b33a6e..20f75ea 100644 --- a/src/main.lisp +++ b/src/lib.lisp @@ -7,31 +7,31 @@ ;;; CLI OPTIONS -(opts:define-opts - (:name :add - :description "Intaractively add a oneliner to the a wiki." - :long "add") - (:name :tags - :description "A comma separated list of tags to filter search results." - :short #\t - :long "tags" - :arg-parser #'identity - :meta-var "'T1, T2, ...'") - (:name :limit - :description "An integer. The maximum number of results to return." - :short #\l - :long "limit" - :meta-var "N" - :default 10 - :arg-parser #'parse-integer) - (:name :edit - :description "An integer, a result number. Interactively edit af command." - :long "edit" - :meta-var "RESULT" - :arg-parser #'parse-integer) - (:name :not-flagged - :description "Filter flagged oneliners from the search results" - :long "not-flagged")) +;; (opts:define-opts +;; (:name :add +;; :description "Intaractively add a oneliner to the a wiki." +;; :long "add") +;; (:name :tags +;; :description "A comma separated list of tags to filter search results." +;; :short #\t +;; :long "tags" +;; :arg-parser #'identity +;; :meta-var "'T1, T2, ...'") +;; (:name :limit +;; :description "An integer. The maximum number of results to return." +;; :short #\l +;; :long "limit" +;; :meta-var "N" +;; :default 10 +;; :arg-parser #'parse-integer) +;; (:name :edit +;; :description "An integer, a result number. Interactively edit af command." +;; :long "edit" +;; :meta-var "RESULT" +;; :arg-parser #'parse-integer) +;; (:name :not-flagged +;; :description "Filter flagged oneliners from the search results" +;; :long "not-flagged")) (defparameter +help-suffix+ "Unless RESULT is an integer, search for oneliners that involve each command in COMMANDS. @@ -45,11 +45,11 @@ E.g. # run the third result from the last search with arguments foo and bar ol 3 foo bar") -(defun help-text () - (opts:describe :prefix "Oneliners Wiki Command Line Tool" - :args "[[RESULT ARGS | COMMANDS]" - :usage-of "ol" - :suffix +help-suffix+)) +;; (defun help-text () +;; (opts:describe :prefix "Oneliners Wiki Command Line Tool" +;; :args "[[RESULT ARGS | COMMANDS]" +;; :usage-of "ol" +;; :suffix +help-suffix+)) ;;; CONFIG AND RESULTS FILE LOCATIONS @@ -105,13 +105,13 @@ printed to OUTPUT-STREAM. " ;;; main -(defun main () - (handler-case - (multiple-value-bind (options free-args) (opts:get-opts) - (print (list :options options :free-args free-args)) - (terpri) - (uiop:quit)) - (unix-opts:unknown-option (err) - (declare (ignore err)) - (princ (help-text)) - (terpri)))) +;; (defun main () +;; (handler-case +;; (multiple-value-bind (options free-args) (opts:get-opts) +;; (print (list :options options :free-args free-args)) +;; (terpri) +;; (uiop:quit)) +;; (unix-opts:unknown-option (err) +;; (declare (ignore err)) +;; (princ (help-text)) +;; (terpri)))) |