Comments (10)
This should be fixed now. rg
was being a bit too aggressive with trying to read from stdin
. It will now only try if it's given a file or a FIFO.
from ripgrep.
Are you sure your search is taking place in the right directory and actually returns results? I can run :!rg --vimgrep foo
in my vim just fine.
It might help to try running :!rg --files
to see precisely what it's trying to search.
from ripgrep.
@BurntSushi This is weird..
:!rg --files
prints out the files properly
However, :!rg appName
returns 1
from ripgrep.
Just to confirm the reported issue, I'm also seeing this behavior with the shell returned 1
from rg
where ag
works as expected. This is using NeoVim (NVIM v0.1.6-120-g4a6b4bb) on OS X 10.11.6 for what it's worth. When I add the --files
flag, it does output the expected list of files, but always exits with 1, as far as my limited testing has shown.
from ripgrep.
Thanks @elasticdog
I'm using NeoVim on Ubuntu 14.04 with oh-my-zsh.
from ripgrep.
Interesting, I can finally reproduce this in neovim (Linux), but vim works fine (Linux, Mac).
Only thing I can think of is that rg
thinks its getting stdin
piped, so it tried to read it, finds nothing, and reports failure. I'll dig into it.
from ripgrep.
could it be due to this? Quoting:
This is not a bug, it is the new behavior of bang commands: We no longer spawn the program with it's stdout connected to Nvim tty, instead we open a pipe, read output and display to the user. This is the only way the bang commands will be consistent across UIs, so programs designed to be used interactively from the terminal will no longer work from inside nvim.
from ripgrep.
I'm running into something similar trying to add rg
to atom-fuzzy-grep.
rg --ignore-case --with-filename --no-heading --column
produces output compatible to ag
.
Testing with rg --files
works fine, but with any other flags, the process exits with code 1. I'm not a Node expert, but I think the library author sets the stdio
options for ChildProcess to ignore stdin
link.
from ripgrep.
@BurntSushi Awesome! Do you plan to release a new version soon? Thank you! 😄
from ripgrep.
I'd like to get a release out today. I'm just trying to cram as many fixes in as I can. :-)
from ripgrep.
Related Issues (20)
- Include regex syntax in man page HOT 1
- Include ---no-ignore-files in --unrestricted option? HOT 1
- ripgrep mis-parses `*[\<\>\:\"\/\\\|\?\*]*` in `.gitignore` HOT 2
- Incorrect application of ignore rule with single glob in nested HOT 1
- Since nightly-2024-02-06 , could not compile with --features 'simd-accel' HOT 4
- rg allocates too much memory with: `rg --files --ignore-file ~/.ultimate-gitignore` HOT 2
- Repo HOT 1
- When i using rg to find file's type of rust, it doesn't work. HOT 1
- Typo in help description for --vimgrep option: "im" instead of "in" HOT 1
- rg spins in a nanosleep loop when one thread is blocked on a fifo
- [ignore] Fallback to use git check-ignore or support hook iteration HOT 3
- [feature request] Context up to a matching pattern instead of by fixed number of lines HOT 1
- ignore: WalkBuilder::build_parallel() example does not compile HOT 1
- FR: sort results by count HOT 1
- ripgrep does not properly apply ignore rules from .gitignore in parent directory
- global ignore / ripgreprc shell parameter expansion HOT 2
- unicode uppercase HOT 3
- Negation pattern/whitelisting is ignored from `--ignore-file` HOT 8
- .gitignore rule is matched incorrectly while in a subdir
- Adjacent replaced multiline matches result in wrong line numbers HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ripgrep.