6 ms·
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
by mistersys 6y ago
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.
- inetknght 6y agoI'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.
- remram 6y agoThat 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.
- inetknght 6y ago> 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.
- remram 6y agoI 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?
- inetknght 6y agoI 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
- zoomablemind 6y ago'git grep' allows the search within the repo, assuming that you have it cloned locally.
- upbeat_general 6y agoI 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.