4 ms·
I am using ag. Is it worth changing to RipGrep ? The other unix command line tool that I love is autojump. I am thinking on trying fish and probably fzf.
by corpMaverick 9y ago
I am using ag. Is it worth changing to RipGrep ?
The other unix command line tool that I love is autojump.
I am thinking on trying fish and probably fzf.
- goldfishparty 9y agoRipGrep doesn't have some very useful PCRE features. https://github.com/BurntSushi/ripgrep#why-shouldnt-i-use-ripgrep https://github.com/BurntSushi/ripgrep#why-shouldnt-i-use-rip... If you use lookarounds (or often use grep -P), RipGrep may not cover all of your needed use cases. That said, it's very fast for general use.
- dsissitka 9y agoYou might find this discussion between the creators of The Silver Searcher and ripgrep useful: https://news.ycombinator.com/item?id=12567328 https://news.ycombinator.com/item?id=12567328
- kuwze 9y agoFZF and fish don't play well if I remember correctly (I hope I'm mistaken though.)
- corpMaverick 9y agoI was just looking at fish. It has a plugin system called fisherman. With plugins fzf, and z - An autojump clone. https://github.com/fisherman/fzf https://github.com/fisherman/fzf https://github.com/fisherman/z https://github.com/fisherman/z
- perryprog 9y agoFish user here! FZF works beautifully with fish, no plugin manager needed. `brew install fzf` gives you the option to install scripts for fish if it's your shell (IIRC).
- ssijak 9y agoI wanted to try fish too, but too many plugins or libs has a warning on github "does not work with fish" so I just saved myself some headaches and decided to resume with using already great zsh.
- StavrosK 9y agoI use both ag and rg with fish. For me, both are equally fast (because my repositories are small enough that it doesn't matter), but ag has better UI (I remember the --python option, but have no idea how to filter with rg). Those are about the only differences that matter to me, so I use whatever is muscle memory. Usually rg, unless I want to search for specific filetypes. If you're wondering whether to switch, don't bother unless you find ag slow. Fish, on the other hand, I can't live without. I recommend fisherman and z, and a few other plugins I forget now (I use one that shows a notification if your long running command completes while the terminal is in the background, I love it).
- burntsushi 9y ago> don't bother unless you find ag slow Or if you want more correct gitignore matching. > (I remember the --python option, but have no idea how to filter with rg) rg -tpy 'def __init__' or, to exclude Python files rg -Tpy 'def __init__' You can see the list of types available with `rg --type-list`.
- deleted 9y ago[deleted]
- StavrosK 9y agoAh, thanks for that, I didn't even know rg had types (I thought -t accepted the actual extensions). I'm not saying your tool is worse than ag, just that it doesn't make sense to switch if you're not having problems with ag.