-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
What version of ripgrep are you using?
ripgrep 12.1.1
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
How did you install ripgrep?
brew install ripgrep
What operating system are you using ripgrep on?
Darwin 19.6.0 x86_64
zsh 5.8 (x86_64-apple-darwin19.6.0)
Describe your bug.
rg outputs wrong matches when everything is matched and replaced with custom string
What are the steps to reproduce the behavior?
Preparation
❯❯❯ cd $(mktemp -d)
❯❯❯ touch a b c d e
Example1 - When it works
❯❯❯ fd . | rg 'a.*' -r '$0.<NO_EXTENSION>'
a.<NO_EXTENSION>
Example2 - When it fails
❯❯❯ fd . | rg '.*' -r '$0.<NO_EXTENSION>'
a.<NO_EXTENSION>
.<NO_EXTENSION>
b.<NO_EXTENSION>
.<NO_EXTENSION>
c.<NO_EXTENSION>
.<NO_EXTENSION>
d.<NO_EXTENSION>
.<NO_EXTENSION>
e.<NO_EXTENSION>
.<NO_EXTENSION>
What is the expected behavior?
Example2 - How it should behave
❯❯❯ fd . | rg '.*' -r '$0.<NO_EXTENSION>'
a.<NO_EXTENSION>
b.<NO_EXTENSION>
c.<NO_EXTENSION>
d.<NO_EXTENSION>
e.<NO_EXTENSION>
What do you think ripgrep should have done?
Removed the .<NO_EXTENSION> from the output
Metadata
Metadata
Assignees
Labels
No labels