This does not appear to be a bug, in that grep is operating as documented. When
searching recursively, --exclude-dir=GLOB will "skip any subdirectory whose base
name matches GLOB. Ignore any redundant trailing slashes in GLOB." In your case,
GLOB contains a non-redundant trailing slash, and such
When I run:
grep -Hrn --color=auto --exclude-dir=idserver/sql anything
Then the subdirectory idserver/sql is not ignored (it's included in the output).
The searching tree is like this:
.
./idserver
./idserver/sql
./idserver/sql/tablename
./idserver/sql/tablename/2013-10-07.sql
So if "./idserver