Skip to content

Commit 0b3261b

Browse files
pksunkaragitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 81fa024 commit 0b3261b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

git-web--browse.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ valid_custom_tool()
3131

3232
valid_tool() {
3333
case "$1" in
34-
firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open | start)
34+
firefox | iceweasel | chrome | chromium | konqueror | w3m | links | lynx | dillo | open | start)
3535
;; # happy
3636
*)
3737
valid_custom_tool "$1" || return 1
@@ -103,7 +103,7 @@ fi
103103

104104
if test -z "$browser" ; then
105105
if test -n "$DISPLAY"; then
106-
browser_candidates="firefox iceweasel konqueror w3m links lynx dillo"
106+
browser_candidates="firefox iceweasel chrome chromium konqueror w3m links lynx dillo"
107107
if test "$KDE_FULL_SESSION" = "true"; then
108108
browser_candidates="konqueror $browser_candidates"
109109
fi
@@ -146,6 +146,11 @@ case "$browser" in
146146
test "$vers" -lt 2 && NEWTAB=''
147147
"$browser_path" $NEWTAB "$@" &
148148
;;
149+
chrome|chromium)
150+
# Actual command for chromium is chromium-browser.
151+
# No need to specify newTab. It's default in chromium
152+
eval "$browser_path" "$@" &
153+
;;
149154
konqueror)
150155
case "$(basename "$browser_path")" in
151156
konqueror)

0 commit comments

Comments
 (0)