Description
If I do a search like this:
C:\> rg -g "!C:/foo/bar/**" search "C:\foo\"
Then the -g
glob is not excluded. I have to write it like -g "!/foo/bar"
. I think this is expected because globs starting with / should be matched as relative from the cwd. However, if I'm searching across drives,
C:\> rg -g "!Z:/foo/bar/**" search "Z:\foo\"
then the exclude glob is applied. I think this is correct too because !/foo/bar
would match something in C:, not Z:.
But if that works, then is there a reason that -g "!C:/foo/bar/**"
can't also be applied when C:\
is the cwd, just for consistency?
My particular case is searching folders across multiple drives simultaneously, and processing glob patterns to be applied to those different folders, and not wanting to special-case C:.