mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-01 12:42:01 -07:00
[vim] Use fnameescape to escape command line arguments
Fix https://github.com/junegunn/fzf.vim/issues/404 Thanks to @janlazo.
This commit is contained in:
@@ -149,13 +149,8 @@ function! s:tmux_enabled()
|
||||
endfunction
|
||||
|
||||
function! s:escape(path)
|
||||
let escaped_chars = '$%#''"'
|
||||
|
||||
if has('unix')
|
||||
let escaped_chars .= ' \'
|
||||
endif
|
||||
|
||||
return escape(a:path, escaped_chars)
|
||||
let path = fnameescape(a:path)
|
||||
return s:is_win ? escape(path, '$') : path
|
||||
endfunction
|
||||
|
||||
" Upgrade legacy options
|
||||
|
Reference in New Issue
Block a user