aboutsummaryrefslogtreecommitdiff
path: root/build-app.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'build-app.lisp')
-rw-r--r--build-app.lisp41
1 files changed, 39 insertions, 2 deletions
diff --git a/build-app.lisp b/build-app.lisp
index 0f62f62..21f896f 100644
--- a/build-app.lisp
+++ b/build-app.lisp
@@ -24,6 +24,41 @@ three items long, and is interpreted as TOKEN USERNAME PASSWORD. E.g.:
Would attempt to make a new user named c00lhacker with password
my1337pw.")
+(defparameter +oneliners-variables-help-text+
+"
+Oneliners may contain variables. There are positional variables and
+named variables.
+
+POSITIONAL VARIABLES appear in the oneliner as a # followed by a
+number, which must 1 or greater. For example:
+
+ echo Hello #1, Happy #2
+
+The #1 and #2 are a positional variables. You might call the above
+like
+
+ ol 8 Doofus Tuesday
+
+Assuming that the above is the 8th search result, then \"Hello Doofus,
+ Happy Tuesday\" would print to the console.
+
+NAMED VARIABLES are similar. They appear in the oneliner as # followed
+by an letter in the Roman alphabet, followed by any sequence of Roman
+letters, numbers, or the symbol _. For example:
+
+ echo Hello #name you get a #thing
+
+The #name and #thing are named variables. You might call the above like so:
+
+ ol 3 name=Goober thing='sock in the nose'
+
+Which should print \"Hello Goober you get a sock in the nose\".
+
+Finally, you can MIX POSITIONAL AND NAMED VARIABLES so long as, when
+you run the oneliner, all positional variables appear first.
+")
+
+
;;; CLON SYNOPSIS DEFINITION
(defsynopsis (:postfix "[TAGS ...] | N [ARGS ...]")
@@ -59,10 +94,12 @@ my1337pw.")
(flag :long-name "whois"
:description "View information about a contributor. ARGS is just a contributor handle.")
(enum :long-name "help"
- :enum '(:account :wiki :invites)
+ :enum '(:account :wiki :invites :variables)
:argument-name "TOPIC"
:description "Print help for a topic.
-Topics: wiki, account, invites"))
+Topics: wiki, account, invites, variables"))
+ (group (:header "Variables" :hidden t)
+ (text :contents +oneliners-variables-help-text+))
(group (:header "Wiki" :hidden t)
(text :contents "Options For Managing Oneliners")
(flag :long-name "add"