diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.lisp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib.lisp b/src/lib.lisp index 147e294..680e93a 100644 --- a/src/lib.lisp +++ b/src/lib.lisp @@ -93,12 +93,16 @@ the directories that appear in the value of that variable." (defun tags-from-oneliner (oneliner) (remove-if-not #'executable-on-system-p (ppcre:split " +" oneliner))) + + +(rl:register-hook :signal (lambda () (uiop:quit))) + (defun prompt (prompt &key (expect (constantly t)) retry-text (prefill "")) - ;; register a prefil hook + ;; register a prefill hook (rl:register-hook :pre-input (lambda () @@ -135,6 +139,12 @@ the directories that appear in the value of that variable." ;;; API REQUEST FUNCTIONS +(defun print-item-explanation (number) + (with-cached-result (ol number) + (when (getf ol :explanation) + (princ #\newline) + (princ (getf ol :explanation))))) + (defun flag-item (item-number) (with-cached-result (ol item-number) (ensure-config) @@ -250,7 +260,8 @@ the directories that appear in the value of that variable." :prefill "auto"))) (explanation (when (y-or-n-p "Provide an explanation?") - (string-from-editor)))) + (string-from-editor + (format nil "~a~%~%" oneliner))))) (api:request-with (:host (host) :body (jonathan:to-json |