diff --git a/git-open b/git-open index d93a63d..6a38c7a 100755 --- a/git-open +++ b/git-open @@ -235,21 +235,16 @@ case $( uname -s ) in CYGWIN*) open='cygstart';; *) # Try to detect WSL (Windows Subsystem for Linux) if uname -r | grep -q Microsoft; then - open='powershell.exe' - openopt='Start' + open='powershell.exe Start' else open='xdg-open' fi;; esac # Allow printing the url if BROWSER=echo -if [[ $BROWSER == "echo" ]]; then - openopt='' -else +if [[ $BROWSER != "echo" ]]; then exec &>/dev/null fi # open it in a browser -${BROWSER:-$open} $openopt "$openurl" - -unset openopt +${BROWSER:-$open} "$openurl"