From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: git@vger.kernel.org
Cc: Christian Couder <christian.couder@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Jonathan Nieder <jrnieder@gmail.com>,
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Subject: [PATCHv2 5/7] web--browse: better support for chromium
Date: Fri, 3 Dec 2010 17:47:39 +0100 [thread overview]
Message-ID: <1291394861-11989-6-git-send-email-giuseppe.bilotta@gmail.com> (raw)
In-Reply-To: <1291394861-11989-1-git-send-email-giuseppe.bilotta@gmail.com>
On Debian-based distributions, Chromium the browser is available under
the name chromium-browser rather than chromium, to prevent conflicts
with the Chromium B.S.U. game.
Look for chromium-browser first when setting the path for chromium, and
also add chromium-browser as a supported browser name. Document the
dual-name support, and mention the dual-name support for
(google-)chrome too.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
Documentation/git-web--browse.txt | 4 ++--
git-web--browse.sh | 11 +++++++----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-web--browse.txt b/Documentation/git-web--browse.txt
index 5d3ae07..c0416e5 100644
--- a/Documentation/git-web--browse.txt
+++ b/Documentation/git-web--browse.txt
@@ -22,8 +22,8 @@ The following browsers (or commands) are currently supported:
* iceweasel
* seamonkey
* iceape
-* chromium
-* google-chrome
+* chromium (also supported as chromium-browser)
+* google-chrome (also supported as chrome)
* konqueror (this is the default under KDE, see 'Note about konqueror' below)
* opera
* w3m (this is the default outside graphical environments)
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 48e5a28..d0e99f5 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -31,7 +31,8 @@ valid_custom_tool()
valid_tool() {
case "$1" in
- firefox | iceweasel | seamonkey | iceape | chrome | google-chrome | chromium |\
+ firefox | iceweasel | seamonkey | iceape |\
+ chrome | google-chrome | chromium | chromium-browser |\
konqueror | opera | w3m | elinks | links | lynx | dillo | open | start)
;; # happy
*)
@@ -42,6 +43,9 @@ valid_tool() {
init_browser_path() {
browser_path=$(git config "browser.$1.path")
+ if test -z "$browser_path" -a "$1" = chromium ; then
+ type chromium-browser > /dev/null 2>&1 && browser_path=chromium-browser
+ fi
test -z "$browser_path" && browser_path="$1"
}
@@ -104,7 +108,7 @@ fi
if test -z "$browser" ; then
if test -n "$DISPLAY"; then
- browser_candidates="firefox iceweasel google-chrome chrome chromium konqueror opera seamonkey iceape w3m elinks links lynx dillo"
+ browser_candidates="firefox iceweasel google-chrome chrome chromium chromium-browser konqueror opera seamonkey iceape w3m elinks links lynx dillo"
if test "$KDE_FULL_SESSION" = "true"; then
browser_candidates="konqueror $browser_candidates"
fi
@@ -147,8 +151,7 @@ firefox|iceweasel|seamonkey|iceape)
test "$vers" -lt 2 && NEWTAB=''
"$browser_path" $NEWTAB "$@" &
;;
-google-chrome|chrome|chromium)
- # Actual command for chromium is chromium-browser.
+google-chrome|chrome|chromium|chromium-browser)
# No need to specify newTab. It's default in chromium
eval "$browser_path" "$@" &
;;
--
1.7.3.2.664.g294b8.dirty
next prev parent reply other threads:[~2010-12-03 16:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 16:47 [PATCHv2 0/7] web--browse cleanup and extensions Giuseppe Bilotta
2010-12-03 16:47 ` [PATCHv2 1/7] CodingGuidelines: mention whitespace preferences for shell scripts Giuseppe Bilotta
2010-12-03 21:43 ` Junio C Hamano
2010-12-03 22:02 ` Giuseppe Bilotta
2010-12-03 22:28 ` Junio C Hamano
2010-12-03 22:46 ` Giuseppe Bilotta
2010-12-03 16:47 ` [PATCHv2 2/7] web--browse: coding style Giuseppe Bilotta
2010-12-07 23:38 ` Junio C Hamano
2010-12-03 16:47 ` [PATCHv2 3/7] web--browse: split valid_tool list Giuseppe Bilotta
2010-12-03 16:47 ` [PATCHv2 4/7] web--browse: support opera, seamonkey and elinks Giuseppe Bilotta
2010-12-03 22:01 ` Junio C Hamano
2010-12-03 22:22 ` Giuseppe Bilotta
2010-12-03 16:47 ` Giuseppe Bilotta [this message]
2010-12-03 21:57 ` [PATCHv2 5/7] web--browse: better support for chromium Junio C Hamano
2010-12-03 22:25 ` Giuseppe Bilotta
2010-12-03 16:47 ` [PATCHv2 6/7] web--browse: use (x-)www-browser if available Giuseppe Bilotta
2010-12-03 17:40 ` Christian Couder
2010-12-03 17:57 ` Giuseppe Bilotta
2010-12-03 22:15 ` Junio C Hamano
2010-12-03 22:45 ` Giuseppe Bilotta
2010-12-04 0:42 ` Jonathan Nieder
2010-12-04 7:49 ` Giuseppe Bilotta
2010-12-03 16:47 ` [PATCHv2 7/7] web--browse: look at the BROWSER env var Giuseppe Bilotta
2010-12-03 17:08 ` Jonathan Nieder
2010-12-03 17:16 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291394861-11989-6-git-send-email-giuseppe.bilotta@gmail.com \
--to=giuseppe.bilotta@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).