mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
Added support for bitbucket, ref gh-2
This commit is contained in:
parent
f247c48c78
commit
6101e0a5ed
10
git-open
10
git-open
|
|
@ -36,7 +36,13 @@ fi
|
|||
|
||||
|
||||
# URL normalization
|
||||
giturl=${giturl/git\@github\.com\:/https://github.com/}
|
||||
# Github support
|
||||
if grep -q github <<<$giturl; then
|
||||
giturl=${giturl/git\@github\.com\:/https://github.com/}
|
||||
# bitbucket support
|
||||
elif grep -q bitbucket <<<$giturl; then
|
||||
giturl=${giturl/git\@bitbucket\.org\:/https://bitbucket.org/}
|
||||
fi
|
||||
giturl=${giturl%\.git}
|
||||
|
||||
|
||||
|
|
@ -56,7 +62,7 @@ fi
|
|||
# simplify URL for master
|
||||
giturl=${giturl/tree\/master/}
|
||||
|
||||
# get corrent open browser command
|
||||
# get current open browser command
|
||||
if [ $(uname -s) == "Darwin" ]
|
||||
then
|
||||
open=open
|
||||
|
|
|
|||
Loading…
Reference in a new issue