We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f729a56 commit 1554836Copy full SHA for 1554836
plugin/fzf.vim
@@ -94,7 +94,7 @@ function! s:shellesc_cmd(arg)
94
endfunction
95
96
function! fzf#shellescape(arg, ...)
97
- let shell = get(a:000, 0, s:is_win_cmd ? 'cmd.exe' : 'sh')
+ let shell = get(a:000, 0, s:is_win ? 'cmd.exe' : 'sh')
98
if shell =~# 'cmd.exe$'
99
return s:shellesc_cmd(a:arg)
100
endif
@@ -486,7 +486,9 @@ try
486
elseif type == 3
487
let temps.input = s:fzf_tempname()
488
call s:writefile(source, temps.input)
489
- let source_command = (s:is_win_cmd ? 'type ' : 'cat ').fzf#shellescape(temps.input)
+ " Disable shell escape for git bash, as it breaks the command here
490
+ let source_command = (s:is_win_cmd ? 'type ' : 'cat ')
491
+ \(!s:is_win || !exists('$SHELL')).fzf#shellescape(temps.input)
492
else
493
throw 'Invalid source type'
494
0 commit comments