git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCHv2] git-web--browse: Add support for google chrome

From
Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Date
May 19, 2010, 09:51 UTC
Message-ID
<1274262692-3783-2-git-send-email-pavan.sss1991@gmail.com>
In-Reply-To
<1274262692-3783-1-git-send-email-pavan.sss1991@gmail.com>

Add support for another web browser called chrome. To select it, the value of the browser is 'chromium'.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
---
 git-web--browse.sh |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/git-web--browse.sh b/git-web--browse.sh
index a578c3a..6df5ee8 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-browser" "$@" &
+	;;
     konqueror)
 	case "$(basename "$browser_path")" in
 	    konqueror)
-- 
1.7.1.16.g5d405c.dirty
Previous: Pavan Kumar SunkaraNext: Erik Faye-Lund
Message 2 of 5 in “[PATCHv4 GSoC] gitweb: Move static files into seperate subdirectory”
  1. Pavan Kumar SunkaraMay 19, 2010
  2. [PATCHv2] git-web--browse: Add support for google chromePavan Kumar Sunkara, May 19, 2010
  3. Erik Faye-LundMay 19, 2010
  4. Will PalmerMay 19, 2010
  5. Jay SoffianMay 19, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.