aboutsummaryrefslogtreecommitdiff
path: root/build-app.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'build-app.lisp')
-rw-r--r--build-app.lisp11
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)))