From 9baf7c48747f78a0bd850fc90610195c45da003f Mon Sep 17 00:00:00 2001 From: Bryan Head Date: Tue, 6 Sep 2016 13:03:07 -0500 Subject: [PATCH] Make fzf target correct session in group Fixes #643 Doesn't break #648 --- bin/fzf-tmux | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/fzf-tmux b/bin/fzf-tmux index c7701e9..ff923f0 100755 --- a/bin/fzf-tmux +++ b/bin/fzf-tmux @@ -161,14 +161,14 @@ done if [[ -n "$term" ]] || [[ -t 0 ]]; then cat <<< "\"$fzf\" $opts > $fifo2; echo \$? > $fifo3 $close" > $argsf - tmux set-window-option synchronize-panes off \;\ + TMUX=$(echo $TMUX | cut -d , -f 1,2) tmux set-window-option synchronize-panes off \;\ set-window-option remain-on-exit off \;\ split-window $opt "cd $(printf %q "$PWD");$envs bash $argsf" $swap \ > /dev/null 2>&1 else mkfifo $fifo1 cat <<< "\"$fzf\" $opts < $fifo1 > $fifo2; echo \$? > $fifo3 $close" > $argsf - tmux set-window-option synchronize-panes off \;\ + TMUX=$(echo $TMUX | cut -d , -f 1,2) tmux set-window-option synchronize-panes off \;\ set-window-option remain-on-exit off \;\ split-window $opt "$envs bash $argsf" $swap \ > /dev/null 2>&1