Hacker News new | past | comments | ask | show | jobs | submit login

GitHub search is not very smart, but I prefer that when searching code. When searching code, I'm usually trying to find exact tokens i.e. a variable name or an error message string vs. searching documents.

I find it useful all the time.




I've found that `grep` with PCRE enabled is far more useful to find exact tokens like variable names or error message strings.

I've never had Github's search find what I'm looking for.


That requires you to clone. It's a minor hassle if you search over a single repo, but when searching across an organization or the whole site, using grep is not an option.


> That requires you to clone. It's a minor hassle if you search over a single repo, but when searching across an organization or the whole site, using grep is not an option.

Are you kidding? The finer granularity that searching over an organization or whole site makes grep the far better choice especially since its output can be fed as input to more filtering steps.


I can't understand your point. GitHub can search over finer granularities e.g. single repo. And did you understand my use case at all, about grep not being an option when searching at wider scales?

No, I am not "kidding"... are you?


I don't understand grep not being an option when searching at wider scales. I have yet to find a wide-enough scale that grep can't handle.

And GitHub's search results are _literally_ useless.

> No, I am not "kidding"... are you?

Nope



I use pure `grep`, not `git-grep`.


I also find it useful yet it still often misses exact matches.

If I search for “int x = 5” and it doesn’t return “int x = 5;”, there’s an issue here.


'git grep' allows the search within the repo, assuming that you have it cloned locally.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: