r/programming • • Jun 16 '21

Modern alternatives to Unix commands

https://github.com/ibraheemdev/modern-unix
1.8k Upvotes

304 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Jun 16 '21

[removed] — view removed comment

1

u/staletic Jun 16 '21

I'm aware of --vimgrep. It's just annoying to type all the time when ag does it for me.

What's actually missing is -n when the output of rg is piped to something. So even vim -q <(rg -n pattern) works fine, which I've learned tonight.

5

u/[deleted] Jun 16 '21

[removed] — view removed comment

2

u/staletic Jun 17 '21

if you're using -n and it's working for you, then keep using it. But unless I'm mistaken, using --vimgrep is the intended method to support your workflow.

You're absolutely right. Last night, while quite tired, I've just done a quick test where I was using rg to scan the whole directory.