From b4f58df9388059c74747004c21b12c5cea72ac83 Mon Sep 17 00:00:00 2001 From: Jorge Morante Date: Fri, 6 Oct 2017 18:24:37 +0200 Subject: [PATCH] "fixing" copy paste in both linux and OSX? --- scripts/fingers.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/fingers.sh b/scripts/fingers.sh index 2dc73ea..3a3253d 100755 --- a/scripts/fingers.sh +++ b/scripts/fingers.sh @@ -103,12 +103,18 @@ function copy_result() { tmux set-buffer "$result" + if [[ "$OSTYPE" == "linux-gnu" ]]; then + tmux_yank_prefix="nohup" + else + tmux_yank_prefix="" + fi + if [ ! -z "$FINGERS_COPY_COMMAND" ]; then echo -n "$result" | eval "nohup $FINGERS_COPY_COMMAND" > /dev/null fi if [[ $HAS_TMUX_YANK = 1 ]]; then - echo -n "$result" | eval "$tmux_yank_copy_command" > /dev/null + echo -n "$result" | eval "$tmux_yank_prefix $tmux_yank_copy_command" > /dev/null fi }