Skip to content
Myr

[fzf-tmux/vim] Fixes for fish (#204)

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 16ca9c6 · Browse files · 2 files+17 added−9 removed
This commit

State

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

Diff stats

2 files+17 added−9 removed

  • other:+17 added−9 removed

2 files+17 added−9 removed

modified:bin/fzf-tmux+11 added-9 removed
98 unmodified lines
99 rm -f $argsf $fifo1 $fifo2 $fifo3100}101trap cleanup EXIT SIGINT SIGTERM102103# Build arguments to fzf104str=""105for arg in "${args[@]}"; do106 str="$str \"${arg//\"/\\\"}\""107done108cat <<< "$str" > $argsf109103fail() {104 >&2 echo "$1"105 exit 1106}
5 unmodified lines
112[ -n "$FZF_DEFAULT_COMMAND" ] && envs="$envs FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")"113114mkfifo $fifo2115mkfifo $fifo3116117# Build arguments to fzf118opts=""119for arg in "${args[@]}"; do120 opts="$opts \"${arg//\"/\\\"}\""121done122123if [ -n "$term" -o -t 0 ]; then124 cat <<< "$fzf $opts > $fifo2; echo \$? > $fifo3 $close" > $argsf125 tmux set-window-option -q synchronize-panes off \;\125 split-window $opt "cd $(printf %q "$PWD");$envs"' bash -c "'$fzf' $(cat '$argsf') > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap126 split-window $opt "cd $(printf %q "$PWD");$envs bash $argsf" $swap127else128 mkfifo $fifo1129 cat <<< "$fzf $opts < $fifo1 > $fifo2; echo \$? > $fifo3 $close" > $argsf130 tmux set-window-option -q synchronize-panes off \;\129 split-window $opt "$envs"' bash -c "'$fzf' $(cat '$argsf') < '$fifo1' > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap131 split-window $opt "$envs bash $argsf" $swap132 cat <&0 > $fifo1 &133fi134cat $fifo2135[ "$(cat $fifo3)" = '0' ]
1 unmodified line
modified:plugin/fzf.vim+6 added
103 unmodified lines
104 return copy105endfunction106107function! fzf#run(...) abort108try109 let oshell = &shell110 set shell=sh111 if has('nvim') && bufexists('[FZF]')112 echohl WarningMsg113 echomsg 'FZF is already running!'114 echohl None
36 unmodified lines
151 endif152 finally153 call s:popd(dict)154 endtry155finally156 let &shell = oshell157endtry158endfunction159160function! s:present(dict, ...)161 for key in a:000
199 unmodified lines