diff options
author | Colin Okay <okay@toyful.space> | 2022-03-05 18:47:42 -0600 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-03-05 18:47:42 -0600 |
commit | 21b9de1653b92be7d0e23e5bec854e9dfb2153de (patch) | |
tree | 118b2d83223421a148f0de37dbbb732ef6a1ec3e /build-app.lisp | |
parent | 0b9c364c4b6c73f5e1a6cfb0069288b2736fb1ee (diff) |
added --version
Diffstat (limited to 'build-app.lisp')
-rw-r--r-- | build-app.lisp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/build-app.lisp b/build-app.lisp index b50635f..bb3d312 100644 --- a/build-app.lisp +++ b/build-app.lisp @@ -26,6 +26,9 @@ (in-package :oneliners.cli.app) +;;; VERSION +(defparameter +ol-version+ "0.6.0") + ;;; HELP TEXTS (defparameter +invite-help-text+ " @@ -131,8 +134,10 @@ export EDITOR=/usr/bin/zile (group (:header "HELP OPTIONS") (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, editor")) + (flag :long-name "help" + :description "Print help for a topic. Topics: wiki, account, invites, variables, editor") + (flag :long-name "version" + :description "Print the client's version")) (group (:header "Advanced Options" :hidden t) (flag :long-name "clear-cache" :description "Clears all cached search results from your system.")) @@ -202,6 +207,8 @@ than the users." (handler-case (let ((arguments (remainder))) (cond + ((getopt :long-name "version") + (format t "Oneliner CLI Version: ~a~%" +ol-version+)) ((getopt :long-name "help") (if (and arguments (find-group-with-header (first arguments))) (help :item (find-group-with-header (first arguments))) |