aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.lisp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib.lisp b/src/lib.lisp
index 750dfea..c6801df 100644
--- a/src/lib.lisp
+++ b/src/lib.lisp
@@ -154,14 +154,19 @@ the directories that appear in the value of that variable."
(ppcre:split " +" (prompt "(e.g. foo bar goo): ")))))
(explanation
(when (y-or-n-p "Provide an explanation?")
- (string-from-editor))))
+ (string-from-editor)))
+ (runstyle
+ (if (y-or-n-p "Is GUI, TUI, or requires further input?")
+ "MANUAL"
+ "AUTO")))
(api:request-with
(:host (host)
:body (jonathan:to-json
(list :oneliner oneliner
:tags tags
:brief brief
- :explanation explanation))
+ :explanation explanation
+ :runstyle runstyle))
:content-type "application/json")
(api:post--oneliner :token (api-token))
(format t "Added~%"))))
@@ -208,14 +213,16 @@ the directories that appear in the value of that variable."
(print results output)))
(defun print-oneliner-result-for-user (number oneliner)
- (format t "~3a~a~a: ~a"
+ (format t "~3a~a~a~a: ~a"
number
(if (getf oneliner :isflagged)
"⚠" " ")
(if (getf oneliner :islocked)
"🔒" " ")
+ (if (equalp "manual" (getf oneliner :runstyle))
+ "📋" " ")
(getf oneliner :brief))
- (format t "~% ~a~%~%" (getf oneliner :oneliner)))
+ (format t "~% ~a~%~%" (getf oneliner :oneliner)))
(defun search-for-oneliners (terms limit not-flagged-p)