aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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 ()