[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21027: --exclude-dir matches search dir
From: |
Aron Griffis |
Subject: |
bug#21027: --exclude-dir matches search dir |
Date: |
Thu, 9 Jul 2015 23:57:40 -0400 |
This generates output:
$ grep -rl --exclude-dir=usr LINUX /usr/include
and this doesn't:
$ grep -rl --exclude-dir='usr*' LINUX /usr/include
This feels like a bug. My actual use-case is more like the following, but
the above seems like a more universal test case.
$ grep -rl --exclude-dir='.*' /home/aron/.virtualenvs/pp/src PATT
This surprised me by not generating any results. I had expected the
exclusion to only affect dirs within the given path, not match on the path
itself, but it seems to be aborting because '.*' matches '.virtualenvs'.
Is this a bug or just a bad assumption on my part?
$ grep --version
/usr/bin/grep (GNU grep) 2.21
Thanks,
Aron
- bug#21027: --exclude-dir matches search dir,
Aron Griffis <=