From 3fd3ea4d1fda17ac4a425065d3ee981b78389711 Mon Sep 17 00:00:00 2001 From: Jorge Morante Date: Wed, 14 Feb 2018 21:25:09 +0100 Subject: [PATCH] use tmux run-shell instead of eval so xdg-open works --- scripts/fingers.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fingers.sh b/scripts/fingers.sh index e67756a..44f6612 100755 --- a/scripts/fingers.sh +++ b/scripts/fingers.sh @@ -106,17 +106,17 @@ function copy_result() { tmux set-buffer "$result" if [[ "$OSTYPE" == "linux-gnu" ]]; then - tmux_yank_prefix="nohup" + exec_prefix="nohup" else - tmux_yank_prefix="" + exec_prefix="" fi if [ ! -z "$FINGERS_COPY_COMMAND" ]; then - echo -n "$result" | eval "nohup $FINGERS_COPY_COMMAND" > /dev/null + tmux run-shell -b "echo -n \"$result\" | $exec_prefix $FINGERS_COPY_COMMAND > /dev/null" fi if [[ $HAS_TMUX_YANK = 1 ]]; then - echo -n "$result" | eval "$tmux_yank_prefix $tmux_yank_copy_command" > /dev/null + tmux run-shell -b "echo -n \"$result\" | $exec_prefix $tmux_yank_copy_command > /dev/null" fi }