diff options
author | Colin Okay <okay@toyful.space> | 2022-03-04 16:40:18 -0600 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-03-04 16:40:18 -0600 |
commit | 08c061a7616d78c3a0770c7b1c4c1b85640b38fd (patch) | |
tree | 695e98bbd6ac728bb9a2c72338aa3693d8376403 /src/lib.lisp | |
parent | e59989078a22d8c2f0039039faa53e9207eb49f6 (diff) |
add name when adding oneliner
Diffstat (limited to 'src/lib.lisp')
-rw-r--r-- | src/lib.lisp | 9 |
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 |