Ignore the arguments when testing the grep executable

This commit is contained in:
Plamen Kolev
2018-03-04 13:57:06 +00:00
committed by Andy Stewart
parent 5db4a3a2a5
commit 983193456f

View File

@@ -60,7 +60,7 @@ endif
let default_grep = 'grep'
call s:set('g:gitgutter_grep', default_grep)
if !empty(g:gitgutter_grep)
if executable(g:gitgutter_grep)
if executable(split(g:gitgutter_grep)[0])
if $GREP_OPTIONS =~# '--color=always'
let g:gitgutter_grep .= ' --color=never'
endif