Skip to content
Myr

Use absolute path of fzf when splitting tmux window

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent c111af0 · Browse files · 1 file+8 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−2 removed

  • other:+8 added−2 removed

1 file+8 added−2 removed

modified:bin/fzf-tmux+8 added-2 removed
48 unmodified lines
49 rm -f $fifo1 $fifo2 $fifo350}51trap cleanup EXIT SIGINT SIGTERM5253fail() {54 >&2 echo "$1"55 exit 156}57fzf=$(which fzf 2> /dev/null) || fail "fzf executable not found"5859mkfifo $fifo260mkfifo $fifo361if [ -t 0 ]; then56 tmux split-window $opt 'bash -c "fzf '"$fzf_args"' > '$fifo2'; echo \$? > '$fifo3'"'62 tmux split-window $opt 'sh -c "'$fzf' '"$fzf_args"' > '$fifo2'; echo \$? > '$fifo3'"'63else64 mkfifo $fifo159 tmux split-window $opt 'bash -c "fzf '"$fzf_args"' < '$fifo1' > '$fifo2'; echo \$? > '$fifo3'"'65 tmux split-window $opt 'sh -c "'$fzf' '"$fzf_args"' < '$fifo1' > '$fifo2'; echo \$? > '$fifo3'"'66 cat <&0 > $fifo1 &67fi68cat $fifo269[ "$(cat $fifo3)" = '0' ]
1 unmodified line