From 08c061a7616d78c3a0770c7b1c4c1b85640b38fd Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 4 Mar 2022 16:40:18 -0600 Subject: add name when adding oneliner --- src/lib.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3