Skip to content

Commit 70bb59c

Browse files
committed
[vim] Handle '>' and " separately
1 parent 05d72cc commit 70bb59c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugin/fzf.vim

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ if s:is_win
4646
endfunction
4747

4848
function! s:shellesc(arg)
49-
let escaped = substitute(a:arg, '[">]', '^&', 'g')
49+
let escaped = substitute(a:arg, '>', '^&', 'g')
50+
let escaped = substitute(a:arg, '"', '\\^&', 'g')
5051
let escaped = substitute(escaped, '\\\\^', '\\^&', 'g')
5152
return '^"'.substitute(escaped, '[^\\]\zs\\$', '\\\\', '').'^"'
5253
endfunction

0 commit comments

Comments
 (0)