simplified the open command by using a case stmt

This commit is contained in:
Brent Beardsley 2015-02-08 11:30:10 -07:00
parent 8d137e7623
commit 9aa854b039

View file

@ -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