| skipped 234 lines |
235 | 235 | | CYGWIN*) open='cygstart';; |
236 | 236 | | *) # Try to detect WSL (Windows Subsystem for Linux) |
237 | 237 | | if uname -r | grep -q Microsoft; then |
238 | | - | open='powershell.exe' |
239 | | - | openopt='Start' |
| 238 | + | open='powershell.exe Start' |
240 | 239 | | else |
241 | 240 | | open='xdg-open' |
242 | 241 | | fi;; |
243 | 242 | | esac |
244 | 243 | | |
245 | 244 | | # Allow printing the url if BROWSER=echo |
246 | | - | if [[ $BROWSER == "echo" ]]; then |
247 | | - | openopt='' |
248 | | - | else |
| 245 | + | if [[ $BROWSER != "echo" ]]; then |
249 | 246 | | exec &>/dev/null |
250 | 247 | | fi |
251 | 248 | | |
252 | 249 | | # open it in a browser |
253 | | - | ${BROWSER:-$open} $openopt "$openurl" |
254 | | - | |
255 | | - | unset openopt |
| 250 | + | ${BROWSER:-$open} "$openurl" |
256 | 251 | | |