Skip to content
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

Standard input detection doesn't work under PowerShell on macOS #1741

Closed
drrlvn opened this issue Nov 22, 2020 · 3 comments
Closed

Standard input detection doesn't work under PowerShell on macOS #1741

drrlvn opened this issue Nov 22, 2020 · 3 comments
Labels
wontfix A feature or bug that is unlikely to be implemented or fixed.

Comments

@drrlvn
Copy link

drrlvn commented Nov 22, 2020

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?

macOS Big Sur 11.0.1 (20B29)

Describe your bug.

Under PowerShell, when piping output to ripgrep it seems to search in the current directory instead of in the piped input.

What are the steps to reproduce the behavior?

In a directory containing a single file test.txt containing the line "infile", try searching input using rg.

What is the actual behavior?

$ echo "input" | rg input

$ echo "input" | rg input -
input

$ echo "input" | rg infile
test.txt
1:infile

What is the expected behavior?

The input should be searched instead of current directory.

@r-darwish
Copy link
Contributor

In addition, I checked Ubuntu 18.04 and Windows 10 with the same version of Powershell. Windows works as expected and Ubuntu has the same problem.

@drrlvn
Copy link
Author

drrlvn commented Nov 22, 2020

Forgot to mention my PowerShell version:

PowerShell 7.1.0

@BurntSushi BurntSushi added the wontfix A feature or bug that is unlikely to be implemented or fixed. label Nov 22, 2020
@BurntSushi
Copy link
Owner

This is unlikely a bug in ripgrep, and likely an issue with PowerShell.

If there's an easy fix that ripgrep (or more likely, the atty crate) can do, then folks are welcome to do the research and propose a fix. But I have no plans to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix A feature or bug that is unlikely to be implemented or fixed.
Projects
None yet
Development

No branches or pull requests

3 participants