From: Pavan Kumar Sunkara Date: Sat, 29 May 2010 18:36:51 +0000 (+0530) Subject: git-web--browse: Add support for google chrome and chromium X-Git-Tag: v1.7.2-rc0~49^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0b3261b84da92011f82ac9f2b9a8e89ac4a5bb04;p=git.git git-web--browse: Add support for google chrome and chromium Add support for google's chrome & chromium. The value of the browser is 'chromium' or 'chrome' to select it. You can always provide config variable for browser path if they are not installed in right paths. Signed-off-by: Pavan Kumar Sunkara Signed-off-by: Junio C Hamano --- diff --git a/git-web--browse.sh b/git-web--browse.sh index a578c3a73..dbded76aa 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 | 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 chrome chromium konqueror w3m links lynx dillo" if test "$KDE_FULL_SESSION" = "true"; then browser_candidates="konqueror $browser_candidates" fi @@ -146,6 +146,11 @@ case "$browser" in test "$vers" -lt 2 && NEWTAB='' "$browser_path" $NEWTAB "$@" & ;; + 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)