URL templates as bookmarks
-
There are some sites I'd like to bookmark with a placeholder in the URL, a lá
https://github.com/myusername/{repo-name}
Let's say I assign this bookmark a shortcut of
gh
. In Quick Commands, if I typegh(my-awesome-repo)
, it should take me tohttps://github.com/myusername/my-awesome-repo
. With no argument provided, it just takes me tohttps://github.com/myusername
.Other use cases would include Amazon S3 (navigating between/within buckets) and really any site that uses intuitive/user-defined slugs (e.g., my company's curriculum navigator).
Bonus points if I could define something like
https://github.com/myusername/{repo_name}/tree/{branch_name}
and pass in
gh(my-awesome-repo)(master)
to navigate tohttps://github.com/myusername/my-awesome-repo/tree/master
-
You could already do the first one as a search. If you define a "search" with the search URL as https://github.com/myusername/%s and with the search shortcut gh then you could type "gh my awesome repo" and it should work. (Yes, usually search replaces spaces with hyphens.) Not the other part though - you can't do a blank search.
-
@sgunhouse thank you! hadn't thought of that
-
-
-
Thank you for your request. As this post has had less than 5 votes over 4 years it will now be archived.