Use defined webbrowser command

This commit is contained in:
Wryn Wagner
2021-03-01 14:48:57 -07:00
parent a130cdd7a0
commit 03903d3e75
3 changed files with 10 additions and 5 deletions

View File

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