mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-21 20:35:11 +00:00
[vim] Fix fzf#shellescape when shell=fish (#2828)
`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). Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
parent
6dcf5c3d7d
commit
3b7a962dc6
@ -96,7 +96,12 @@ function! fzf#shellescape(arg, ...)
|
||||
if shell =~# 'cmd.exe$'
|
||||
return s:shellesc_cmd(a:arg)
|
||||
endif
|
||||
return s:fzf_call('shellescape', a:arg)
|
||||
try
|
||||
let [shell, &shell] = [&shell, shell]
|
||||
return s:fzf_call('shellescape', a:arg)
|
||||
finally
|
||||
let [shell, &shell] = [&shell, shell]
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! s:fzf_getcwd()
|
||||
|
Loading…
Reference in New Issue
Block a user