Skip to content

Commit 301c5a6

Browse files
authored
Merge pull request #132 from neersighted/patch-1
Remove openopt, allow spaces in $BROWSER
2 parents 4ca1990 + 96c80ff commit 301c5a6

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

git-open

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,21 +235,16 @@ case $( uname -s ) in
235235
CYGWIN*) open='cygstart';;
236236
*) # Try to detect WSL (Windows Subsystem for Linux)
237237
if uname -r | grep -q Microsoft; then
238-
open='powershell.exe'
239-
openopt='Start'
238+
open='powershell.exe Start'
240239
else
241240
open='xdg-open'
242241
fi;;
243242
esac
244243

245244
# Allow printing the url if BROWSER=echo
246-
if [[ $BROWSER == "echo" ]]; then
247-
openopt=''
248-
else
245+
if [[ $BROWSER != "echo" ]]; then
249246
exec &>/dev/null
250247
fi
251248

252249
# open it in a browser
253-
${BROWSER:-$open} $openopt "$openurl"
254-
255-
unset openopt
250+
${BROWSER:-$open} "$openurl"

0 commit comments

Comments
 (0)