使用 sourcegraph 在 github 存储库中搜索带有特殊字符的术语?

Search github repo for term with special characters using sourcegraph?

top answer to How to search on GitHub to get exact string matches, including special characters shows a way to search GitHub for terms that include special characters using a tool called sourcegraph.

我成功了:

https://sourcegraph.com/search?q=context:global+.where%28&patternType=literal

但我想将搜索范围缩小到特定的存储库(不是所有 GitHub)- 我该怎么做?

例子

这是我在 GitHub 上尝试的确切搜索:

https://github.com/sharetribe/sharetribe/search?q=.where%28

(它搜索 where 而不是 .where(

这是在 sourcegraph 上的搜索:

https://sourcegraph.com/search?q=context:global+.where%28&patternType=literal

所有 GitHub 的结果 returns 而不是特定的回购 sharetribe/sharetribe

如何将此搜索限制为一个存储库?

您可以使用 repo 过滤器限制此搜索:

https://sourcegraph.com/search?q=context:global+repo:sharetribe/sharetribe+.where%28&patternType=literal