-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
enhancementAn enhancement to the functionality of the software.An enhancement to the functionality of the software.
Description
Please tick this box to confirm you have reviewed the above.
- I have a different issue.
What version of ripgrep are you using?
ripgrep 14.1.1
How did you install ripgrep?
APT
What operating system are you using ripgrep on?
Ubuntu
Describe your bug.
Glob [foo
should be interpreted as a literal [foo
.
What are the steps to reproduce the behavior?
- Run
rg -g '[foo' whatever
What is the actual behavior?
$ rg -g '[foo' whatever
rg: error parsing glob '[foo': unclosed character class; missing ']'
What is the expected behavior?
It should return matches of "whatever" in the file called exactly [foo
. man glob.7
doesn't seem to mention any invalid patterns. It seems that e.g. find -name '[foo'
interprets it that way. Gitignores also do, apparently (this came up in jj-vcs/jj#7259).
Metadata
Metadata
Assignees
Labels
enhancementAn enhancement to the functionality of the software.An enhancement to the functionality of the software.