A collection of characters, stories, and other elements
Today, we’re releasing more powerful code search on Sourcegraph.com and Sourcegraph. You can use operators such as repo: and file: to restrict your search to certain repositories and files (by regular expression match on their name).
For example, repo:foo will restrict your query to repositories whose name contains “foo,” and likewise for file:bar.
Use the search fields on the homepage to construct your query the first few times.
As you continue using it, you can express your query more quickly by using the operators (repo: and file:, etc.) in the main search box. Here are some sample queries (across a sample set of open source projects) to get you started:
p.s. One other minor improvement: You can now select multiple lines (and share a link to multiple lines) by shift-clicking on a line number to expand the selection when you’re viewing a code file.