Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Confirm. GitHub search is "search" not "excellent search"


It's such a wasted opportunity too. It would be so powerful to understand how a tool is used by searching for popular repositories that are already using it.


I do that all the time! What's GitHub search missing that prevents you from doing that?

Their code search supports regular expressions now, which I find pretty incredible. https://github.blog/engineering/architecture-optimization/th...


Maybe I have my search syntax wrong. Suppose I want to search for go projects with a flake.nix in the repo root. This finds nothing:

    language:Go path:/flake.nix 
I know they exist though, for instance here's one: github.com/joerdav/xc

Can you tell me where I've gone wrong?


That's searching for files that are in the Go language but are flake.nix files - which is 0 results because flake.nix files are not written in Go.

This seems to work;

    path:/flake.nix go
https://github.com/search?q=path%3A%2Fflake.nix%20go&type=co...


I see, I thought it would be matching the repo's contained languages, not the file's language. Thanks for clearing that up for me.

Searching for "go" as a substring turns up a lot of false positives, but at least now I know the search is not flat out broken.


The fact that you can’t even specify the branch or search across branches is anything but excellent




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

Search: