You can add Sourcegraph as a browser search engine to quickly search Sourcegraph from your browser’s location bar when you type a special shortcut, such as src. This is one of the most common ways to initiate a search on Sourcegraph.
The easiest way is to install the Sourcegraph browser extension, which automatically configures the location bar src shortcut to search Sourcegraph.
chrome://settings. Under Search engine, click Manage search engines. Next to Other search engines, click ADD.
%sinto the URL’s
?q=query parameter (and remove any parts of the query that you don’t want to keep).
To use the shortcut, focus in the browser address bar, type in the keyword you chose (such as src), and press Space. Now type your Sourcegraph code search query and hit enter. You’ll be taken to the search results page on your Sourcegraph instance.
For more information on setting Chrome search engines, see Chrome’s help page.
To add Sourcegraph as a search engine in Firefox:
To configure a shortcut (keyword) for quicker access:
To use the search engine, type src Space in the location bar, then your Sourcegraph search query. Pressing Enter will go to the Sourcegraph search results page for your query.
See “Add or remove a search engine in Firefox” for more information.
Consult your web browser’s documentation or settings page for information on how to add custom search engines. Most web browsers support this feature.