Hacker GitHub

← All repos

ggreer/the_silver_searcher

View on GitHub ↗ ★ 27,126 C

A code-searching tool similar to ack, but faster.

128 mentions on Hacker News by 103 people: 10 stories, 118 comments · first 2012-04-02 · latest 2025-03-11

Mentions per year 128 mentions · busiest year 2016 (25)
20082026
  1. …and merged: https://github.com/ggreer/the_silver_searcher/pull/974 I'll tag a new release in a day or two. Also, it looks like the sift author is getting on the .ignore train: https://github.com/svent/sift/issues/78#issuecomment-2493352...…
  2. …all those little details are ironed-out. That said, may the best code searching tool win. :) 1. https://github.com/ggreer/the_silver_searcher/commit/bd65e26...
  3. …note. If you want to see implementations I suggest looking at https://github.com/OpenGrok/OpenGrok https://github.com/ggreer/the_silver_searcher https://github.com/google/codesearch and my own https://github.com/boyter/searchcode-server
  4. …a user passes the undocumented --nomultiline option to ag. Default behavior with a regex query is https://github.com/ggreer/the_silver_searcher/blob/master/sr...
    comment by ggreer · 2016-08-25 · in Why GNU grep is fast (2010)
  5. …Really? Am I misunderstanding this code that very much appears to search line by line? https://github.com/ggreer/the_silver_searcher/blob/master/sr... GNU grep never does "throw line into buffer and then search it." GNU grep just searches…
    comment by burntsushi · 2016-08-25 · in Why GNU grep is fast (2010)
  6. …various numbers of threads change performance. (The default is for ag to use #CPUs-1 workers.) 1. https://github.com/ggreer/the_silver_searcher
    comment by ggreer · 2016-08-24 · in Why GNU grep is fast (2010)
  7. …2. http://geoff.greer.fm/2012/09/07/the-silver-searcher-adding-... 3. https://github.com/ggreer/the_silver_searcher/blob/7d52078cb...
    comment by ggreer · 2016-08-24 · in Why GNU grep is fast (2010)
  8. For fast grep, consider ag https://github.com/ggreer/the_silver_searcher
    comment by hossbeast · 2016-08-24 · in Why GNU grep is fast (2010)
  9. …a regex. Setting to LANG to C would also probably make it faster. [0] http://beyondgrep.com/ [1] https://github.com/ggreer/the_silver_searcher
    comment by 0xmohit · 2016-08-24 · in Why GNU grep is fast (2010)
  10. …this is amazing. Elevate your command line game: autojump https://github.com/wting/autojump ag https://github.com/ggreer/the_silver_searcher Use zsh and put this in .zshrc https://gist.github.com/chx/f9509cb2db6595be334ca2404fac8a91 Now…
  11. ▲ 2
    A code-searching tool similar to ack, but faster
    story by indatawetrust · 2016-07-17 · 1 comment
  12. …fan of this software. Link because the name makes it hard to search for: http://geoff.greer.fm/ag/ https://github.com/ggreer/the_silver_searcher
  13. …are not recognized properly. The matcher that git uses cannot be included due to licensing (see https://github.com/ggreer/the_silver_searcher/pull/614 ). Does seem like there is hope, as a BSD licensed version exists. My fingers are…
  14. If you haven't tried https://github.com/ggreer/the_silver_searcher yet you're missing out The progression is grep with a ton of flags (or even find | xargs grep) -> ack -> ag. ag is faster than ack, automatically understands .gitignore,…
  15. For anyone else confused about what an "ag" match is: https://github.com/ggreer/the_silver_searcher (Ag = Chemical symbol for silver)
  16. …files to give more relevant results). Might be worth a try on Windows as well? You can find ag in https://github.com/ggreer/the_silver_searcher
  17. …[2] in the mix [3] for faster searching/grepping. [1]: https://github.com/ctrlpvim/ctrlp.vim [2]: https://github.com/ggreer/the_silver_searcher [3]: http://stackoverflow.com/questions/18285751/use-ag-in-ctrlp-...
    comment by spystath · 2016-01-17 · in Vimmers, you don't need NerdTree
  18. …direction with the features proposed in this letter. I hope they take this letter seriously. 1. https://github.com/ggreer/the_silver_searcher 2. User accuses ag of hard-locking his computer: https://github.com/ggreer/the_silver_searcher/iss…
    comment by ggreer · 2016-01-14 · in Dear GitHub
  19. …there's a summary in the GitHub README.[1] I've also written a few blog posts on the subject.[2] 1. https://github.com/ggreer/the_silver_searcher#how-is-it-so-f... 2. http://geoff.greer.fm/ag/#related-posts
  20. The Silver Searcher, or ag: https://github.com/ggreer/the_silver_searcher Designed as a replacement for all of the use cases of Ack. Is even faster.
  21. …bad enough, this would make it even harder. My "refactoring tool" of choice is grep (or rather ag, https://github.com/ggreer/the_silver_searcher ), with choice #3 you can't just grep for an identifier anymore.
  22. …lines, but you can use the .agingore file to ignore *.min.js, node_modules, and other patterns. https://github.com/ggreer/the_silver_searcher/wiki/Advanced-...
    comment by lancefisher · 2015-11-05 · in Sift: Grep on steroids
  23. …that grep is often the bottleneck for data pipeline tasks like you describe. The silver searcher ( https://github.com/ggreer/the_silver_searcher ) is, in my experience, about 10x faster than grep for tasks like pulling out fields from json…
  24. …So don't feel intimidated. Once you learn those bits of historical trivia, you'll be fine. 1. https://github.com/ggreer/the_silver_searcher 2. http://hentenaar.com/dont-learn-c-the-wrong-way
    comment by ggreer · 2015-09-02 · in C Programming Guidelines
  25. …like to think I'm pretty good. You may even use some of the stuff I've written, such as ag[1]. 1. https://github.com/ggreer/the_silver_searcher
  26. https://github.com/ggreer/the_silver_searcher
  27. …"find strings in files, especially code files", I've become a big fan of ag, "the silver searcher": https://github.com/ggreer/the_silver_searcher In addition to all the tricks applied by GNU grep (such as Boyer-Moore), it also splits work…
    comment by jmcphers · 2015-03-06 · in Why GNU grep is fast (2010)
  28. …to the Silver Searcher [0], I'm surprised it wasn't mentioned at all since they're similar. [0] https://github.com/ggreer/the_silver_searcher
    comment by spain · 2015-01-28 · in Hound: A Fast Code Search Tool
  29. How is hound better than ag [1]? [1] https://github.com/ggreer/the_silver_searcher
    comment by quanticle · 2015-01-28 · in Hound: A Fast Code Search Tool
  30. GitHub link for those who don't know about it: https://github.com/ggreer/the_silver_searcher/ I built ag for searching code. It can be (ab)used for other stuff, but the defaults are optimized for a developer searching a codebase. Also,…
  31. Because we now have [ag]( https://github.com/ggreer/the_silver_searcher ), which is similar to ack, but much faster
    comment by chingjun · 2014-12-22 · in Grab – simple but very fast grep
  32. > Are there any benchmarks of this vs ag ( https://github.com/ggreer/the_silver_searcher )? Ask, and ggreer ( https://news.ycombinator.com/item?id=8781374 ) shall give (within 10 minutes). :-)
    comment by JadeNB · 2014-12-22 · in Grab – simple but very fast grep
  33. …does hurt performance. Still, I enable it by default in ag. I think the tradeoff is worthwhile. 1. https://github.com/ggreer/the_silver_searcher Edit: The mutex locking change was so straightforward that I submitted a PR:…
    comment by ggreer · 2014-12-21 · in Grab – simple but very fast grep
  34. Are there any benchmarks of this vs ag ( https://github.com/ggreer/the_silver_searcher )? Some of the optimizations are similar (mmap and pcre_study), while others are opposed (ag uses pthreads, grab claims disk I/O is the bottleneck and…
    comment by Scaevolus · 2014-12-21 · in Grab – simple but very fast grep
  35. …lines of code. Almost always, that time is best spent building on top of existing software. 1. https://github.com/ggreer/the_silver_searcher
  36. …Vim can't catch up. NeoVim looks promising, since it fixes Vim's architectural problems. 1. https://github.com/ggreer/the_silver_searcher/ 2. http://geoff.greer.fm/2011/12/27/the-silver-searcher-better-...
    comment by ggreer · 2014-11-02 · in Vim After 11 Years (2013)
  37. did now https://github.com/ggreer/the_silver_searcher/issues/483 (though it took me a while to figure out a more precise issue title than "--max-count is taunting me")
    comment by unhammer · 2014-08-28 · in Useful Unix commands for exploring data
  38. ag. I use this tool between 50 and 100 times a day. https://github.com/ggreer/the_silver_searcher
  39. …a second. [0] https://github.com/Shougo/unite.vim [1] https://github.com/Shougo/vimfiler.vim [2] https://github.com/ggreer/the_silver_searcher
  40. …available on a target platform, I stick them them in a util.h/util.c, wrapped in #ifndefs. Like so: https://github.com/ggreer/the_silver_searcher/commit/a43dc87...
    comment by ggreer · 2014-06-19 · in Debian is switching back to GLIBC
  41. …I'll add that. With regards to search_stream() in search.c... all I can say is that I'm sorry: https://github.com/ggreer/the_silver_searcher/blob/master/sr... I built ag for myself; both as a tool and to improve my skills profiling,…
  42. …it can be installed with any OS package manager (brew, apt, yum). [1] http://rak.rubyforge.org [2] https://github.com/ggreer/the_silver_searcher
  43. …with the decision to print 10000 character long lines mean a lot of search results are useless. [0] https://github.com/ggreer/the_silver_searcher/issues/367 for example
  44. I thought we were done with this already? https://github.com/ggreer/the_silver_searcher
  45. …with ag is that it appears to be broken on even moderately larger files where ack works just fine: https://github.com/ggreer/the_silver_searcher/issues/384
  46. …a real world use case. [1]: http://unix.stackexchange.com/questions/108471/no-output-usi... [2]: https://github.com/ggreer/the_silver_searcher
  47. It's also worth checking out The Silver Searcher: https://github.com/ggreer/the_silver_searcher
  48. …to install an additional less-standard package... I personally find it worth the installation. [0]: https://github.com/ggreer/the_silver_searcher
    comment by euank · 2014-04-09 · in Using Git Grep
  49. …issues) are standardized across projects. Hosting on GitHub really does benefit everyone. 1. https://github.com/ggreer/the_silver_searcher
    comment by ggreer · 2014-03-17 · in Self-hosted Git Server
  50. …all these options, but the warnings helped me discover bugs that had been lurking for years. 1. https://github.com/ggreer/the_silver_searcher 2. http://clang-analyzer.llvm.org/scan-build.html 3. http://clang.llvm.org/docs/ClangFormat.html
    comment by ggreer · 2014-03-10 · in What Are Your GCC Flags?