Skip to content
Myr

[vim] Fix fzf#shellescape when shell=fish (#2828)

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

`shellescape()` behavior is different when `shell=fish`, so we should set `shell` before calling `shellescape()`, otherwise an unexpected result may occur (e.g. https://github.com/kevinhwang91/nvim-bqf/issues/56).

authored by Daniel Zhang · committed by GitHub · parent 6dcf5c3 · Browse files · 1 file+6 added−1 removed
This commit

State

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

Trailers

  • Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>

Diff stats

1 file+6 added−1 removed

  • other:+6 added−1 removed

1 file+6 added−1 removed

modified:plugin/fzf.vim+6 added-1 removed
94 unmodified lines
95 let shell = get(a:000, 0, s:is_win ? 'cmd.exe' : 'sh')96 if shell =~# 'cmd.exe$'97 return s:shellesc_cmd(a:arg)98 endif99 try100 let [shell, &shell] = [&shell, shell]99 return s:fzf_call('shellescape', a:arg)101 return s:fzf_call('shellescape', a:arg)102 finally103 let [shell, &shell] = [&shell, shell]104 endtry105endfunction106107function! s:fzf_getcwd()108 return s:fzf_call('getcwd')
951 unmodified lines