News for hackers. Stuff that matters.
Re:Show HN: Search code in GitHub repos using regular expres... by latenightcoding on Sunday February 23, 2020 @03:32PM (#22399342)
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.
Re:Show HN: Search code in GitHub repos using regular expres... by sophiebits on Sunday February 23, 2020 @06:28PM (#22400319)
Re:Show HN: Search code in GitHub repos using regular expres... by lucasverra on Sunday February 23, 2020 @03:49PM (#22399420)
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

Re:Show HN: Search code in GitHub repos using regular expres... by erikpukinskis on Sunday February 23, 2020 @03:53PM (#22399444)
The fact that you can’t search for file names is the funniest part to me.
Re:Show HN: Search code in GitHub repos using regular expres... by WhiteOwlLion on Monday February 24, 2020 @12:54PM (#22406419)
If you fork a repo, you can't search on the forked repo. Confirmed grep.app behaves the same way as github search.
Re:Show HN: Search code in GitHub repos using regular expres... by nickthemagicman on Sunday February 23, 2020 @04:35PM (#22399706)
You can but only in the repo itself not on a site wide scale.
Re:Show HN: Search code in GitHub repos using regular expres... by cole-h on Sunday February 23, 2020 @09:16PM (#22401095)
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.
Re:Show HN: Search code in GitHub repos using regular expres... by giancarlostoro on Monday February 24, 2020 @09:33AM (#22404218)
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.

Re:Show HN: Search code in GitHub repos using regular expres... by nickthemagicman on Sunday February 23, 2020 @09:43PM (#22401210)
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!
Re:Show HN: Search code in GitHub repos using regular expres... by aantix on Monday February 24, 2020 @10:05AM (#22404568)
Agree. You can’t even do a literal search with symbols.

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