Hacker News new | ask | show | jobs
by yoo1I 3533 days ago
> I don't know ag and it's not a package in Debian.

You're in for a treat then: the package name is "silversearcher-ag".

Next time you want to grep a directory of files: instead of grepping it, pause, remember this comment, install it and then do "ag <searchterm>" instead.

It's quite a bit faster. Well, lots faster.

2 comments

Interesting. This probably the first utility in Rust I'm aware of that looks like it might belong on a production system (other than "cargo" and other rather excellent rust tooling). Nice way to show off rusts regular expression engine too.
Thanks! I installed it a and aliased grep to 'echo Try ag'.
May as well alias grep to ag XD
Thought of that, but a quick glance over ag's man page shows there are options that I commonly use with grep that work differently with ag. I don't want to mess something up so I'd rather just show myself a reminder.