-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rg prints text "<stdin>" when input is given via stdin #1223
Comments
Please follow the issue template and include the |
Sorry missed that.
|
My guess is that this is a user error somewhere. I cannot reproduce it. I was hoping the debug output would show the argv, but it looks like that isn't quite working as I'd like. Do you have an
More concretely, try
to force that you aren't using an alias. |
It's not aliased as far as I checked.
|
Then I don't know. You'll likely need to debug this yourself since I cannot reproduce it and I can't quite figure out how this could be happening. The first step here would be to just compile master and see if the bug has been fixed already. If not, you'll want to debug this code: Lines 1471 to 1482 in 0913972
Namely, it seems like that's returning true for you, but I don't know why. |
Thanks for the input. I noticed one more thing. Its happening only in my home directory. It feels like a user error to me as well. I will debug this further and update here. |
I'm going to close this out since I can't reproduce it. Please feel free to comment again if you have more details! |
please reopen this issue as a bug because I have the same problem:
Step to reproduce it :
Edit: it yields same problem when I'm under folder contained '-' directory regardless what we grep:
|
@arunvelsriram Could you confirm whether this is the same underlying issue? i.e., Does the output of |
@BurntSushi Actually, I changed my machine recently and didn't face the issue after that. However, I tried the steps provided by @iiey and am able to replicate the issue. |
Sorry, am not sure if my old machine listed a |
I had a look into the suggested part of the code and tried to debug this. Lines 1188 to 1204 in 0913972
When paths are empty, a default path is given which is what is got by Most cases when there is no directory with the name "-",
The solution I am thinking is to skip the check if its a directory, if the path is the default one. I'm not sure if this is correct though. |
I don't need to be pinged. Either someone can investigate and fix this issue, or I'll do it myself when I get a chance. This is not a high priority bug. |
What version of ripgrep are you using?
How did you install ripgrep?
brew install rg
What operating system are you using ripgrep on?
OS X High Sierra
Describe your question, feature request, or bug.
When I do
rg
over content passed throughstdin
, the output contains the text "<stdin>" along with the matches. It started to happen recently after I updated some of mybash
configs and those are not related torg
. Does anyone know why this is happening?The text was updated successfully, but these errors were encountered: