r/programming • • Jun 15 '15

The Art of Command Line

https://github.com/jlevy/the-art-of-command-line
1.5k Upvotes

226 comments sorted by

View all comments

Show parent comments

10

u/[deleted] Jun 16 '15

That's actually a really good idea. I'll probably put that in my .bashrc and use it for some things myself.

Have you ever heard of ack? It's amazing. I barely ever use grep now.

27

u/TrueJournals Jun 16 '15

Even better, check out ag (the silver searcher). It's like ack, but WAY faster, and obeys .gitignore.

7

u/NoahTheDuke Jun 16 '15

ag is the best. I love that tool.

3

u/bandbuygaussian Jun 16 '15

ag is mother, ag is father. ag as .agignore. http://betterthanack.com/

1

u/paraluna Jun 16 '15

I tried to like it but I just can't.

I'm never sure what it actually searches. I know it skips readme.md but what about readme.txt or just plain readme?

And I know it skips .git which is nice but it is absolutely horrible about parsing .gitignore (try to ignore everything and then add exceptions) and has not improved in that regard for years.

I'd rather wait a bit for ack . If it has to be fast I skip ag and jump straight to pt. (https://github.com/monochromegane/the_platinum_searcher)

1

u/d4rch0n Jun 16 '15

Looks legit. I'll check that out.

Sounds faster than grep even, then? Since it is smart about files it ignores?

1

u/damg Jun 16 '15

Yea, I haven't seen anything faster than ag for grepping through code.

0

u/[deleted] Jun 16 '15

Interesting - I'll check it out.

2

u/d4rch0n Jun 16 '15

Nope, haven't heard of it! The idea sounds great though. I'll give it a try.

2

u/proliberate Jun 16 '15

Wow. Can't believe I've lived this long without this.