Skip to content

Commit

Permalink
Add a google-chrome option for web--browse
Browse files Browse the repository at this point in the history
On some systems, the chrome browser is named google-chrome.  We add
support for this case.

Signed-off-by: Nathan W. Panike <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
panike authored and gitster committed Jul 26, 2010
1 parent ffd45f9 commit ec13666
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git-web--browse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ valid_custom_tool()

valid_tool() {
case "$1" in
firefox | iceweasel | chrome | chromium | 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
Expand Down Expand Up @@ -103,7 +103,7 @@ fi

if test -z "$browser" ; then
if test -n "$DISPLAY"; then
browser_candidates="firefox iceweasel chrome chromium 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
Expand Down Expand Up @@ -146,7 +146,7 @@ case "$browser" in
test "$vers" -lt 2 && NEWTAB=''
"$browser_path" $NEWTAB "$@" &
;;
chrome|chromium)
google-chrome|chrome|chromium)
# Actual command for chromium is chromium-browser.
# No need to specify newTab. It's default in chromium
eval "$browser_path" "$@" &
Expand Down

0 comments on commit ec13666

Please sign in to comment.