Skip to content

Commit

Permalink
Revert shellescape behaviour, explicitly avoid escaping on :Buffers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adnn committed Oct 19, 2022
1 parent f729a56 commit 1554836
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function! s:shellesc_cmd(arg)
endfunction

function! fzf#shellescape(arg, ...)
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')
if shell =~# 'cmd.exe$'
return s:shellesc_cmd(a:arg)
endif
Expand Down Expand Up @@ -486,7 +486,9 @@ try
elseif type == 3
let temps.input = s:fzf_tempname()
call s:writefile(source, temps.input)
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
let source_command = (s:is_win_cmd ? 'type ' : 'cat ')
\(!s:is_win || !exists('$SHELL')).fzf#shellescape(temps.input)
else
throw 'Invalid source type'
endif
Expand Down

0 comments on commit 1554836

Please sign in to comment.