Hacker News new | ask | show | jobs
by thdhhghgbhy 244 days ago
Thanks for the response. I would like to use fzf with rg to search file contents with a previewer open. However when I first open fzf I don't wish to pass any argument to rg, until I start typing. Something like Telescope live_grep.
3 comments

That's more a question for fzf than for ripgrep. ripgrep doesn't have any interactive mode. You give it arguments and it runs. That's it. ripgrep doesn't have any mode where it waits for user input (unless it's waiting for stdin).
You could have incorporated some snark or something, but no, you're always the most helpful you can be. You're very inspirational - thank you!

(Also like thanks for ripgrep I guess?)

>You could have incorporated some snark

Why even say this?

It was the first thing that came into my mind...
Similar to other answers. With a nasty mix of vimscript generating shell commands for fzf to use, that's how I integrated rg and fd with "fzf.vim" in my neovim.

https://github.com/bombela/fzf.vim.rgfd

Nasty, but it works hey!

Thank you, nice.
Certainly possible with fzf, everything you need is in the fzf docs. Here's something in vimscript (sorry) that does that: https://github.com/Emilv2/siefe.vim/blob/8432406581acbf450b5...
Thanks. You've put some work into this.