Skip to content

Instantly share code, notes, and snippets.

@djm
Last active March 16, 2023 04:02
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save djm/0a43f7dee02a2acca4b3894d0b349990 to your computer and use it in GitHub Desktop.
Save djm/0a43f7dee02a2acca4b3894d0b349990 to your computer and use it in GitHub Desktop.
Create a Chrome GitHub Repo Search Shortcut

Create a Chrome search shortcut for your GitHub Repo

Thanks to David Winterbottom (@codeinthehole). See https://twitter.com/codeinthehole/status/1346774847221870593

Instructions

  1. Open Chrome > Settings
  2. Search "manage search engines" and click into it
  3. Click "Add"

  1. Give "search engine" a name. e.g GitHub - Some repo
  2. Give "keyword" a shortcut e.g gh
  3. Give "URL with %s in place of query" the URL below:
https://github.com/search?q=%s+repo%3A[ORG]%2F[REPO]&type=Code

Replace `[ORG]` with your organisation/username and `[REPO]` with the name of your repository.

e.g for Django:

https://github.com/search?q=%s+repo%3Adjango%2Fdjango&type=Code

  1. Click "Add".

  2. Search! e.g Type "gh NameOfComponent" in your address bar.

@adityaomlm
Copy link

So, do I add a search engine for each repository?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment