diff --git a/README.md b/README.md index 903746a..6dfe8fa 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ predefined `Ag` or `Rg` using `fzf#vim#grep`. ```vim command! -bang -nargs=* GGrep \ call fzf#vim#grep( - \ 'git grep --line-number -- '.shellescape(), + \ 'git grep --line-number -- '.fzf#shellescape(), \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), 0) ``` diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 50de117..4b3dfa5 100755 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -914,7 +914,7 @@ function! fzf#vim#grep2(command_prefix, query, ...) \ 'source': ':', \ 'options': ['--ansi', '--prompt', toupper(name).'> ', '--query', a:query, \ '--disabled', - \ '--bind', 'start:reload:'.a:command_prefix.' '.shellescape(a:query), + \ '--bind', 'start:reload:'.a:command_prefix.' '.fzf#shellescape(a:query), \ '--bind', 'change:reload:'.a:command_prefix.' {q} || :', \ '--multi', '--bind', 'alt-a:select-all,alt-d:deselect-all', \ '--delimiter', ':', '--preview-window', '+{2}-/2'] diff --git a/autoload/fzf/vim/complete.vim b/autoload/fzf/vim/complete.vim index 8944b19..0f60b97 100644 --- a/autoload/fzf/vim/complete.vim +++ b/autoload/fzf/vim/complete.vim @@ -49,7 +49,7 @@ endif function! fzf#vim#complete#word(...) let sources = empty(&dictionary) ? ['/usr/share/dict/words'] : split(&dictionary, ',') return fzf#vim#complete(s:extend({ - \ 'source': 'cat ' . join(map(sources, 'shellescape(v:val)'))}, + \ 'source': 'cat ' . join(map(sources, 'fzf#shellescape(v:val)'))}, \ get(a:000, 0, fzf#wrap()))) endfunction diff --git a/doc/fzf-vim.txt b/doc/fzf-vim.txt index 8b85e67..f2244e0 100644 --- a/doc/fzf-vim.txt +++ b/doc/fzf-vim.txt @@ -375,7 +375,7 @@ predefined `Ag` or `Rg` using `fzf#vim#grep`. > command! -bang -nargs=* GGrep \ call fzf#vim#grep( - \ 'git grep --line-number -- '.shellescape(), + \ 'git grep --line-number -- '.fzf#shellescape(), \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), 0) < {11} bin/preview.sh diff --git a/plugin/fzf.vim b/plugin/fzf.vim index fe5fb37..509be44 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -60,7 +60,7 @@ call s:defs([ \'command! -bar -bang Colors call fzf#vim#colors(0)', \'command! -bang -nargs=+ -complete=dir Locate call fzf#vim#locate(, fzf#vim#with_preview(), 0)', \'command! -bang -nargs=* Ag call fzf#vim#ag(, fzf#vim#with_preview(), 0)', -\'command! -bang -nargs=* Rg call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case -- ".shellescape(), fzf#vim#with_preview(), 0)', +\'command! -bang -nargs=* Rg call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case -- ".fzf#shellescape(), fzf#vim#with_preview(), 0)', \'command! -bang -nargs=* RG call fzf#vim#grep2("rg --column --line-number --no-heading --color=always --smart-case -- ", , fzf#vim#with_preview(), 0)', \'command! -bang -nargs=* Tags call fzf#vim#tags(, fzf#vim#with_preview({ "placeholder": "--tag {2}:{-1}:{3..}" }), 0)', \'command! -bang -nargs=* BTags call fzf#vim#buffer_tags(, fzf#vim#with_preview({ "placeholder": "{2}:{3..}" }), 0)',