-
Notifications
You must be signed in to change notification settings - Fork 129
Code search for wildcard characters #402
Comments
This comment has been minimized.
This comment has been minimized.
I'm surprised this isn't already available... it seems like code search, of all things, would need the ability to search for special characters, as they're often a major portion of the query. |
This is really infuriating |
Bump, this would be one of the best features to come to github since code versioning. |
I'd also change the wording, as those aren't just wildcard characters. |
Any progress on this? This is super frustrating. |
Any progress on this?
So how can I search something like |
Any progress on this? |
hopefully this will be done soon, this is one of the biggest painpoints for a "code search" |
this would be great e.g. if searching for a function allowing a search with functionName( would yield better results |
Underscore also seems to be missing here. |
This is very much needed |
good lord please implement this. |
4 years later, still nothing. |
A platform for storing code without an ability to search for code. This is laughable. I can't even search for as basic thing as a class method declaration, or static method call "class::method" without getting tens of thousands of irrelevant hits. |
Lots of calls for the feature but no commitment whatsoever! It's also annoying that you can't do a partial search but only full-word. |
Will we ever get this feature(more like necessity)? |
What, you can't escape the wildcard characters? Incredible... isn't that a 1-hour fix? Certainly not years... |
The word on the street is that this feature is being saved until the big
reveal when azure devops becomes github, and Microsoft announces its own
cryptocurrency “cloudcoin”
You didn’t hear this from me.
…On Mon, Oct 14, 2019 at 5:25 PM Eyal Rozenberg ***@***.***> wrote:
What, you can't escape these? Incredible...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#402?email_source=notifications&email_token=AAE6C6PSWARNNBATONQ24ELQOTPVTA5CNFSM4BE2XNRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBGTMLQ#issuecomment-541931054>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6C6IWCQMSCGZ63QDQ73TQOTPVTANCNFSM4BE2XNRA>
.
|
It's 2020 and still we don't have this feature? |
Yes, your eyesight is spot on. I am seeing what you are seeing.
…On Thu, Jan 9, 2020 at 1:01 PM Sal ***@***.***> wrote:
It's 2020 and still we don't have this feature?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#402?email_source=notifications&email_token=AAE6C6JMZ3ZO3ERYZJ6PXQTQ45Q7ZA5CNFSM4BE2XNRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRGR4A#issuecomment-572680432>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6C6L4VMEWZVKAA5P2243Q45Q7ZANCNFSM4BE2XNRA>
.
|
This makes the code search feature barely usable for me. |
The last time I checked even Google almost ignores most symbols in search term. It could be a similar reason. There could be some design choice that exponentially increases performance for text only search. |
Agreed. But this logic isn’t a good reason to not implement a feature like
this. This just means that it isn’t as easy as you expect to implement the
feature. Likely, they need to add new database indexes and possibly
increase system resources to accommodate the index storage and management.
…On Thu, Feb 27, 2020 at 7:49 AM Numan Zaheer Ahmed ***@***.***> wrote:
The last time I checked even Google almost ignores most symbols in search
term. It could be a similar reason. There could be some design choice that
exponentially increases performance for text only search.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#402?email_source=notifications&email_token=AAE6C6JYG5OUSU74RZ4SC53RE6ZEBA5CNFSM4BE2XNRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENEH43Q#issuecomment-591953518>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6C6PJAFBIVRXZYTU5KFTRE6ZEBANCNFSM4BE2XNRA>
.
|
I agree. I was just trying to guess the reason for not implementing it yet. |
Google search is definetly not a good comparison as it is primarily meant to find natural language expressions but GitHub is foremost targeted at programming languages and hence should focus on searching and finding code expressions. |
The lack of response from devs is becoming more and more infuriating with each passing day. They should at least tell it can't be done, or anything. |
@oomek : Indeed. Even a negative response is a response. |
Official devs won't reply here because this is just an unofficial issue or feature request tracking repository. In case, someone hadn't noticed. |
same question |
So it looks like this is a challenging task. For example to search "int foo(char bar){" The number of false positives is expected to be quite low |
@vp777 : that's certainly an improvement; but not as an alternative. Perhaps that could be implemented as a temporary measure. |
nothing more permanent than temporary Now with regards to implementing the full feature, that's the ideal, but after 4 years, I would say the probability is pretty slim... |
If you're desperate, I just had success doing this manually in Google. I realize this is not equivalent to a native solution, but it did work for my situation. "<|" site::https://github.com This showed me "<|" anywhere Google had indexed. I used this to search for a lot of odd character combos, just to see what languages use them, and for that, it actually worked great. It will not properly show every instance in raw source code. You can try searching only raw.github, or for a specific blob, but with mixed results. "return true;" site::https://github.com/nodejs/node/blob/master/ Yea, idk... This is a very janky solution, but it might help you. Doesn't appear that GitHub is going to. |
For what it's worth, the solution @isaiahshiner proposed above doesn't seem to work for |
Without being able to use wildcards in a search, the search is pretty much pointless. Sad panda. |
why is |
This one is just a pain - cant believe its almost 2021 and we can't search for something like periods or @ - there's no way we can download our entire orgs repo to do a grep search. Its incalculably large.. |
I get that adding wildcard search functionality for a project like GitHub isn't easy, but who decided that just ignoring those characters in a search query was a good alternative? I can't even search for method calls or annotations because '.' and '@' will get ignored and there isn't even a way to escape them. This makes code search next to useless for me, so I have resorted to querying google for GitHub results, which is frankly embarassing. |
could there be a definition for literal expressions, like |
Please |
@4086606 : Maybe you should post this link to HackerNews or somewhere on reddit. |
Done, Hackernews |
@4086606 Thanks for opening discussion & linking back here. 🙇🏾♂️ |
@4086606 Haven't seen it on HN. Did they reject it? If not, can you link there? |
Disclaimer: I work at Sourcegraph, but I'm not commenting here on behalf of them. My coworkers may frown a bit upon my negative tone here, so that's how you know I am speaking truth :) I'm commenting because I love code search, and I research it in my spare time. I really do not understand how GitHub hasn't improved this yet. Can't they just offer search within a single repository by e.g. shelling out to Sourcegraph has had that from day one - for the 6+ years I've worked there, on millions of repositories, as the component for searching historical Git commits. It's even one of our interview questions ("how would you scale a dumb little code search tool built on top of git grep for a small team?") It's truly dumbfounding to me just how long GitHub has neglected this issue. We aren't asking for anything crazy: even if it doesn't have regexp/structural search over every repository, it'd at least be a step up from what we have today. It's okay if it doesn't have semantic understanding of code: we literally just want a search for Meanwhile, we're given ML-based solutions like Natural Language Semantic Code Search and Copilot which just miss the mark completely IMO. People just want the slightest hint of tools they're used to in their IDE on GitHub. If you can run CI / Actions with arbitrary code for all repositories, surely you could shell out to Back when I joined Sourcegraph, I had already seen this issue a handful of times. I thought GitHub would have to improve this soon. If you had told me they wouldn't even try to compete with us on code search in the next 6 years, I would've called you crazy. Here we are today, in 2021 - six years later - and literally nothing has improved with GitHub search. @4086606 @eyalroz this is what you'll need to post to HN if you want to get GitHub's management attention. But I'm not holding my breath, developers deserve better. For anyone who wants decent code search, here is a list of tools that are easily 100x better than what you get from GitHub:
|
My message was approximately as follows (I realize that cloning down and grepping is always an alternative):
Response from James Dennes:
The text was updated successfully, but these errors were encountered: