1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:20:04 +08:00

Ignore .git for rg searches (#3996)

This commit is contained in:
Justin Giancola 2020-12-06 00:37:37 -05:00 committed by GitHub
parent abe3a72017
commit c2fc01fa58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ function! s:get_search_cmd(exe, expr) abort
if a:exe ==# 'grep'
return ['grep', '-inHR', '--exclude-dir', '.git', a:expr, '.']
elseif a:exe ==# 'rg'
return ['rg', '--hidden', '--no-heading', '--color=never', '--with-filename', '--line-number', a:expr, '.']
return ['rg', '-g!.git', '--hidden', '--no-heading', '--color=never', '--with-filename', '--line-number', a:expr, '.']
else
return [a:exe, a:expr]
endif