Hacker News new | ask | show | jobs
by latenightcoding 2302 days ago
github's code search is notoriously bad, feels like a huge missed opportunity. Nice to see you guys reaching out to other people working in this area.
4 comments

I'm not a dev and what i like to to do is go searching for code (a la exact match) to replace whatever variable or text should be changed. Github search in repo kinda worked at some moment, then not.

Then i had to download repo in my local; run VS code (updating first), search there, modify, push. I wish i could do this on Ghub web GUI

The fact that you can’t search for file names is the funniest part to me.
If you fork a repo, you can't search on the forked repo. Confirmed grep.app behaves the same way as github search.
You can but only in the repo itself not on a site wide scale.
Really? I searched for `filename:home.nix` (which brought me to https://github.com/search?utf8=%E2%9C%93&q=filename%3Ahome.n...). That seems site-wide to me, unless I'm misunderstanding you.
These kind of keywords really should be next to the search box with a question mark next to them or something.

TIL some of them are on this page that you only see if you search for an empty string:

https://github.com/search?q=

Click on 'prefixes'. This kind of thing should be readily available from any search box that searches through GitHub.

That's awesome. I didn't know about the keyword filename: I've been using the button to the left of "Clone or Download" this whole time. Thanks for the info!
Agree. You can’t even do a literal search with symbols.

I think there were better solutions on the early 2000’s.