Hey guys I'm trying to change the default grep call to avoid unnecessary plugin installation. What I want from vim is to call the external search using the builtin command :grep with custom arguments, this is what I've tried putting in my rc:

    set wildignore=*.o,*.obj,*~,*.pyc,.git/**,tags,cscope*
    let &grepprg='grep -n -R --exclude=' . &wildignore . ' $*'

usage:

    :set verbose grepprg
    verbose=0                                                                
    grepprg=grep -n -R --exclude=*.o,*.obj,*~,*.pyc,.git/**,tags,cscope* $*
    :lgrep "_cast" ./src/*

output:

    :!grep -n -R --exclude=*.o,*.obj,*~,*.pyc,.git/**,tags,cscope* "_cast" ./src/* 2>&1| tee /tmp/nvimzj3oo1/225                                                           zsh:1: no matches found: --exclude=*.o,*.obj,*~,*.pyc,.git/**,tags,cscope* 

if I execute what vim tried:

    $ grep -n -R --exclude=*.o,*.obj,*~,*.pyc,.git/**,tags,cscope* "_cast" ./src/* 2>&1| tee /tmp/nvimzj3oo1/225
    ./src/daemon/lim_l3_server_mw.cc:160:    LimL3Server *self = static_cast<LimL3Server *>(st);

so, I'm falling to see the problem, any ideas?