mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-01-30 14:45:30 +08:00
Use -- before the search pattern for Ag, Rg, etc. (#1012)
Before this patch, a search pattern starting with a dash like `:Rg -bang` would fail (or exhibit the wrong behaviour) because it would be treated as a option. However, this case is very common when searching for ->member in a project in C, C++, PHP, etc. Co-authored-by: Alexandre Perrin <alex@atipik.ch>
This commit is contained in:
@@ -57,7 +57,7 @@ call s:defs([
|
||||
\'command! -bar -bang Colors call fzf#vim#colors(<bang>0)',
|
||||
\'command! -bang -nargs=+ -complete=dir Locate call fzf#vim#locate(<q-args>, s:p(<bang>0), <bang>0)',
|
||||
\'command! -bang -nargs=* Ag call fzf#vim#ag(<q-args>, s:p(<bang>0), <bang>0)',
|
||||
\'command! -bang -nargs=* Rg call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case ".shellescape(<q-args>), 1, s:p(<bang>0), <bang>0)',
|
||||
\'command! -bang -nargs=* Rg call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case -- ".shellescape(<q-args>), 1, s:p(<bang>0), <bang>0)',
|
||||
\'command! -bang -nargs=* Tags call fzf#vim#tags(<q-args>, <bang>0)',
|
||||
\'command! -bang -nargs=* BTags call fzf#vim#buffer_tags(<q-args>, s:p(<bang>0, { "placeholder": "{2}:{3}", "options": ["-d", "\t"] }), <bang>0)',
|
||||
\'command! -bar -bang Snippets call fzf#vim#snippets(<bang>0)',
|
||||
|
||||
Reference in New Issue
Block a user