aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-02-22 11:39:42 -0600
committerColin Okay <okay@toyful.space>2022-02-22 11:39:42 -0600
commitd6dee4eb2906b1a845488065066fae7ef6906338 (patch)
tree2782ee0f642b0f8e15ebf74633f84d2849201718 /src
parente18e4e43d0467b2341c2176dcdb467f12d4358c7 (diff)
supporting forced clipping. defaulting to bash
Diffstat (limited to 'src')
-rw-r--r--src/lib.lisp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.lisp b/src/lib.lisp
index 442e023..0ea4cda 100644
--- a/src/lib.lisp
+++ b/src/lib.lisp
@@ -152,8 +152,8 @@ the directories that appear in the value of that variable."
(ppcre:all-matches-as-strings "\\$[a-zA-Z_][a-zA-Z0-9_]*" oneliner)
:test #'equal))
-(defun handle-run-oneliner (ol &key (runstyle "auto"))
- (if (equalp runstyle "manual")
+(defun handle-run-oneliner (ol &optional clip)
+ (if clip
(progn (trivial-clipboard:text ol)
(format t "Copied oneliner to clipboard~%"))
(progn
@@ -163,7 +163,7 @@ the directories that appear in the value of that variable."
(run-with-shell ol :shell-name (or (get-shell) "bash")))))
-(defun run-item (item-number args)
+(defun run-item (item-number args &optional force-clip)
(with-cached-result (ol item-number)
(let* ((oneliner (getf ol :oneliner))
(runstyle (getf ol :runstyle))
@@ -186,7 +186,7 @@ the directories that appear in the value of that variable."
do (setf oneliner
(str:replace-all var (second bound) oneliner)))
- (handle-run-oneliner oneliner :runstyle runstyle)))))
+ (handle-run-oneliner oneliner (or force-clip (equalp runstyle "manual")))))))
(defun add-new-oneliner ()