When I have an invalid glob:
$ rg -g "foo" -g "bar" -g "**.txt" foobar
invalid use of **; must be one path component
$ rg -g "foo" -g "bar" -g "{{}}" foobar
nested alternate groups are not allowed
There is an error printed, and the search doesn't continue, but it may not be obvious which glob is causing the issue. This comes up in https://github.com/Microsoft/vscode/issues/24050 but I imagine it may be useful for command line users to have a message like
Invalid glob "{{}}", nested alternate groups are not allowed
Fully agreed that the error message should be improved here. If it's just a matter of printing the invalid glob, that should hopefully be pretty easy to do. I'll see what I can do about this before the next release.
OK, I think this should be fixed. Here is the new output:
$ rg -g "foo" -g "bar" -g "**.txt" foobar
error parsing glob '**.txt': invalid use of **; must be one path component
$ rg -g "foo" -g "bar" -g "{{}}" foobar
error parsing glob '{{}}': nested alternate groups are not allowed
Most helpful comment
OK, I think this should be fixed. Here is the new output: