aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.lisp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib.lisp b/src/lib.lisp
index 4b821f1..036bf1e 100644
--- a/src/lib.lisp
+++ b/src/lib.lisp
@@ -287,6 +287,12 @@ and, failing that, try to fetch from configured server."
(prompt "Oneliner: "
:expect 'valid-oneliner-string-p
:retry-text "Oneliners must contain at least one command: "))
+ (name
+ (string-trim
+ '(#\space #\newline #\tab #\linefeed)
+ (prompt "Name (leave blank for none): "
+ :expect 'valid-oneliner-name-p
+ :retry-text "Must begin with a letter contain only letters, numbers, - and _.")))
(init-tags
(tags-from-oneliner oneliner))
(brief
@@ -313,6 +319,7 @@ and, failing that, try to fetch from configured server."
(:host (host)
:body (jonathan:to-json
(list :oneliner oneliner
+ :name (if (plusp (length name)) name :null)
:tags tags
:brief brief
:explanation explanation
@@ -368,7 +375,7 @@ and, failing that, try to fetch from configured server."
(list :oneliner oneliner
:tags tags
:brief brief
- :name name
+ :name (if (plusp (length name)) name :null)
:explanation explanation
:runstyle runstyle)))
(api:request-with