Skip to main content
added 6 characters in body
Source Link
D. Ben Knoble
  • 27.7k
  • 3
  • 31
  • 68

I couldn't really use the proposed solution because the shellescape returnshellescape returns a string with simple quotes '' so I couldn't use it inside the --exclude--exclude grep opt;opt.

thisThis is what I worked:

let &grepprg="grep -n -r --exclude=\.{o,obj,~,pyc,git}\ --exclude={tags,cscope}\* $* /dev/null"

let &grepprg="grep -n -r --exclude=\\*.{o,obj,~,pyc,git}\\* --exclude={tags,cscope}\\* $* /dev/null"

I couldn't really use the proposed solution because the shellescape return a string with simple quotes ' so I couldn't use it inside the --exclude grep opt;

this is what I worked:

let &grepprg="grep -n -r --exclude=\.{o,obj,~,pyc,git}\ --exclude={tags,cscope}\* $* /dev/null"

I couldn't really use the proposed solution because shellescape returns a string with simple quotes ' so I couldn't use it inside the --exclude grep opt.

This is what I worked:

let &grepprg="grep -n -r --exclude=\\*.{o,obj,~,pyc,git}\\* --exclude={tags,cscope}\\* $* /dev/null"
Source Link
MaikoID
  • 313
  • 2
  • 7

I couldn't really use the proposed solution because the shellescape return a string with simple quotes ' so I couldn't use it inside the --exclude grep opt;

this is what I worked:

let &grepprg="grep -n -r --exclude=\.{o,obj,~,pyc,git}\ --exclude={tags,cscope}\* $* /dev/null"