diff --git a/bin/fzf-tmux b/bin/fzf-tmux index 6b833db..0eb2e37 100755 --- a/bin/fzf-tmux +++ b/bin/fzf-tmux @@ -99,16 +99,17 @@ fail() { exit 1 } fzf=$(which fzf 2> /dev/null) || fail "fzf executable not found" +envs="FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS") FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")" mkfifo $fifo2 mkfifo $fifo3 if [ -t 0 ]; then tmux set-window-option -q synchronize-panes off \;\ - split-window $opt 'sh -c "'$fzf' '"$fzf_args"' > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap + split-window $opt "$envs"' sh -c "'$fzf' '"$fzf_args"' > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap else mkfifo $fifo1 tmux set-window-option -q synchronize-panes off \;\ - split-window $opt 'sh -c "'$fzf' '"$fzf_args"' < '$fifo1' > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap + split-window $opt "$envs"' sh -c "'$fzf' '"$fzf_args"' < '$fifo1' > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap cat <&0 > $fifo1 & fi cat $fifo2