summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-08-16 00:04:45 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-08-16 00:04:45 +0900
commit7ae877bd3a66759fee2b97fd1212f761a16738c6 (patch)
treeff0aea134d74c421fe403f3ce14b3cc441377f99
parentc601fc6437f864c440b9d35c87604e48f2a48446 (diff)
[vim] Handle single/double quote characters in 'dir' option
-rw-r--r--plugin/fzf.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 0a88cf03..e31833ca 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -80,7 +80,7 @@ function! s:shellesc(arg)
endfunction
function! s:escape(path)
- return escape(a:path, ' %#\')
+ return escape(a:path, ' %#''"\')
endfunction
" Upgrade legacy options
@@ -384,7 +384,7 @@ function! s:cmd(bang, ...) abort
let args = extend(['--expect='.join(keys(s:action), ',')], a:000)
let opts = {}
if len(args) > 0 && isdirectory(expand(args[-1]))
- let opts.dir = remove(args, -1)
+ let opts.dir = substitute(remove(args, -1), '\\\(["'']\)', '\1', 'g')
endif
if !a:bang
let opts.down = get(g:, 'fzf_height', get(g:, 'fzf_tmux_height', s:default_height))