Add handy git clone bind

This commit is contained in:
Oliver Blanthorn 2019-08-18 16:12:06 +01:00
parent 077a135f26
commit e3b771acdc
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -29,6 +29,9 @@ bind yp composite js document.getElementById("clone-help-step-1").textContent.re
" Git{Hub,Lab} git clone via SSH yank
bind yg composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | clipboard yank
" As above but execute it and open terminal in folder
bind ,g js let uri = document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git"); tri.native.run("cd ~/projects; git clone " + uri + "; cd \"$(basename \"" + uri + "\" .git)\"; st")
" I like wikiwand but I don't like the way it changes URLs
bindurl wikiwand.com yy composite js document.location.href.replace("wikiwand.com/en","wikipedia.org/wiki") | clipboard yank