Code Monkey home page Code Monkey logo

Comments (10)

BurntSushi avatar BurntSushi commented on May 17, 2024 2

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.

BurntSushi avatar BurntSushi commented on May 17, 2024

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.

flybayer avatar flybayer commented on May 17, 2024

@BurntSushi This is weird..

:!rg --files prints out the files properly

However, :!rg appName returns 1

from ripgrep.

elasticdog avatar elasticdog commented on May 17, 2024

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.

flybayer avatar flybayer commented on May 17, 2024

Thanks @elasticdog

I'm using NeoVim on Ubuntu 14.04 with oh-my-zsh.

from ripgrep.

BurntSushi avatar BurntSushi commented on May 17, 2024

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.

little-dude avatar little-dude commented on May 17, 2024

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.

jonboiser avatar jonboiser commented on May 17, 2024

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.

remi avatar remi commented on May 17, 2024

@BurntSushi Awesome! Do you plan to release a new version soon? Thank you! 😄

from ripgrep.

BurntSushi avatar BurntSushi commented on May 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.