[Ag] Print error message when ag is not found on $PATH

Close #440
This commit is contained in:
Junegunn Choi 2017-09-01 11:10:42 +09:00
parent 39f0c2d0a4
commit 0b0d9f0912
No known key found for this signature in database
GPG key ID: 254BC280FEF9C627

View file

@ -649,6 +649,9 @@ endfunction
" ag command suffix, [options]
function! fzf#vim#ag_raw(command_suffix, ...)
if !executable('ag')
return s:warn('ag is not found')
endif
return call('fzf#vim#grep', extend(['ag --nogroup --column --color '.a:command_suffix, 1], a:000))
endfunction