X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-web--browse.sh;h=3fc4166b25714911b6b1294c7439da1e237e4918;hb=7e7db5e4520388d3a6f1efbe2f7a29d43bd06a2b;hp=4f5c740df5651853e575ba68366152992b0f043d;hpb=bd91890c62d85ec16aadd3fb991b3ad7a365adde;p=git.git diff --git a/git-web--browse.sh b/git-web--browse.sh index 4f5c740df..3fc4166b2 100755 --- a/git-web--browse.sh +++ b/git-web--browse.sh @@ -31,7 +31,7 @@ valid_custom_tool() valid_tool() { case "$1" in - firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open | start) + firefox | iceweasel | chrome | google-chrome | chromium | konqueror | w3m | links | lynx | dillo | open | start) ;; # happy *) valid_custom_tool "$1" || return 1 @@ -103,7 +103,7 @@ fi if test -z "$browser" ; then if test -n "$DISPLAY"; then - browser_candidates="firefox iceweasel konqueror w3m links lynx dillo" + browser_candidates="firefox iceweasel google-chrome chrome chromium konqueror w3m links lynx dillo" if test "$KDE_FULL_SESSION" = "true"; then browser_candidates="konqueror $browser_candidates" fi @@ -111,7 +111,8 @@ if test -z "$browser" ; then browser_candidates="w3m links lynx" fi # SECURITYSESSIONID indicates an OS X GUI login session - if test -n "$SECURITYSESSIONID"; then + if test -n "$SECURITYSESSIONID" \ + -o "$TERM_PROGRAM" = "Apple_Terminal" ; then browser_candidates="open $browser_candidates" fi # /bin/start indicates MinGW @@ -145,6 +146,11 @@ case "$browser" in test "$vers" -lt 2 && NEWTAB='' "$browser_path" $NEWTAB "$@" & ;; + google-chrome|chrome|chromium) + # Actual command for chromium is chromium-browser. + # No need to specify newTab. It's default in chromium + eval "$browser_path" "$@" & + ;; konqueror) case "$(basename "$browser_path")" in konqueror)