mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
simplified the open command by using a case stmt
This commit is contained in:
parent
8d137e7623
commit
9aa854b039
20
git-open
20
git-open
|
|
@ -79,20 +79,12 @@ fi
|
|||
giturl=${giturl/tree\/master/}
|
||||
|
||||
# get current open browser command
|
||||
if [ $(uname -s) == "Darwin" ]
|
||||
then
|
||||
open=open
|
||||
elif [ "$TERM" == "cygwin" ]
|
||||
then
|
||||
if [ "$MSYSTEM" == "MINGW32" ]
|
||||
then
|
||||
open=start
|
||||
else
|
||||
open=cygstart
|
||||
fi
|
||||
else
|
||||
open=xdg-open
|
||||
fi
|
||||
case $( uname -s ) in
|
||||
Darwin) open=open;;
|
||||
MINGW*) open=start;;
|
||||
CYGWIN*) open=cygstart;;
|
||||
*) open=xdg-open;;
|
||||
esac
|
||||
|
||||
# open it in a browser
|
||||
$open $giturl &> /dev/null
|
||||
|
|
|
|||
Loading…
Reference in a new issue