Allowed webbrowser to be a function

This commit is contained in:
Wryn Wagner 2021-03-01 15:18:45 -07:00
parent 03903d3e75
commit 4d28473e50

View File

@ -35,8 +35,8 @@ OPEN_CURRENT_GIT_REPOSITORY_IN_WEB_BROWSER() {
}
local URL="$(git remote get-url $REMOTE | sed 's/git@\([^:]*\):/http:\/\/\1\//')"
[ "$WEBBROWSER" ]\
&& "$WEBBROWSER $URL" >/dev/null 2>&1 \
|| dg-open $URL >/dev/null 2>&1 \
&& $WEBBROWSER $URL >/dev/null 2>&1 \
|| xdg-open $URL >/dev/null 2>&1 \
|| echo $URL;
}