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 ebb6e0a..da3561e 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/!'`"