]> git.phdru.name Git - dotfiles.git/commitdiff
Fix(git-open): Replace `git@` in URL with `https://`
authorOleg Broytman <phd@phdru.name>
Thu, 15 Aug 2019 18:52:29 +0000 (21:52 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 15 Aug 2019 18:52:29 +0000 (21:52 +0300)
In hope the remote repository has web interface.

bin/git-open

index ebb6e0a5295ecab5930518c518cffd312fb365ee..da3561ebe52e041c81df8d5b8ba54387e0ec73a3 100755 (executable)
@@ -18,4 +18,4 @@ if [ -z "$browser_cmd" ]; then
    browser_cmd="webbrowser -n"
 fi
 
-exec $browser_cmd "`git config --get $url_key`"
+exec $browser_cmd "`git config --get $url_key | sed 's!^git@\([-A-Za-z0-9._]\+\):!https://\1/!'`"