-
What version of ripgrep are you using?
How did you install ripgrep?
What operating system are you using ripgrep on?Windows 10 Describe your bug.What are the steps to reproduce the behavior?here is the file.txt:
and then I run in PowerShell:
What is the actual behavior?I get these lines:
but without the replacement, it captured:
What is the expected behavior?as I want to add a single quote both before and after each line, and then add a comma to end each line expecting it cat these lines:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I can reproduce your problem:
But this looks like a shell problem, not a ripgrep problem. In particular, single quotes have nothing to do with this. If you remove your single quotes, you should get the same behavior. In my shell, I have to use
Using just single quotes is possible too, although it is a bit unwieldy and I have no idea whether it works on Windows or not:
|
Beta Was this translation helpful? Give feedback.
-
It seems neither of the commands works on Powershell:
and I tried both of the commands in my WSL, both works:
hope these information will help others |
Beta Was this translation helpful? Give feedback.
-
Here is another example. if my replacement string quoted by double quote marks, captures are missing:
but if they are quoted by single quote marks, variables are captured:
This may be a helpful walkaround when we don't contain single quote marks |
Beta Was this translation helpful? Give feedback.
It seems neither of the commands works on Powershell:
and I tried both of the commands in my WSL, both works:
hope these information will help others