@matheusbsbs / matheus-bagliano / commits / 81f42f1149
Fork 0

web--browse: support opera, seamonkey and elinks

The list of supported browsers is also updated in the documentation. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Giuseppe Bilotta committed Dec 3, 2010 at 17:47 UTC 81f42f11496b9117273939c98d270af273c8a463
2 files changed +13 -7
Documentation/git-web--browse.txt
+6
@@ -20,8 +20,14 @@ The following browsers (or commands) are currently supported:
20
21 * firefox (this is the default under X Window when not using KDE)
22 * iceweasel
23 +* seamonkey
24 +* iceape
25 +* chromium
26 +* google-chrome
27 * konqueror (this is the default under KDE, see 'Note about konqueror' below)
28 +* opera
29 * w3m (this is the default outside graphical environments)
30 +* elinks
31 * links
32 * lynx
33 * dillo
git-web--browse.sh
+7 -7
@@ -31,8 +31,8 @@ valid_custom_tool()
31
32 valid_tool() {
33 case "$1" in
34 - firefox | iceweasel | chrome | google-chrome | chromium | \
35 - konqueror | w3m | links | lynx | dillo | open | start)
34 + firefox | iceweasel | seamonkey | iceape | chrome | google-chrome | chromium | \
35 + konqueror | opera | w3m | elinks | links | lynx | dillo | open | start)
36 ;; # happy
37 *)
38 valid_custom_tool "$1" || return 1
@@ -104,12 +104,12 @@ fi
104
105 if test -z "$browser" ; then
106 if test -n "$DISPLAY"; then
107 - browser_candidates="firefox iceweasel google-chrome chrome chromium konqueror w3m links lynx dillo"
107 + browser_candidates="firefox iceweasel google-chrome chrome chromium konqueror opera seamonkey iceape w3m elinks links lynx dillo"
108 if test "$KDE_FULL_SESSION" = "true"; then
109 browser_candidates="konqueror $browser_candidates"
110 fi
111 else
112 - browser_candidates="w3m links lynx"
112 + browser_candidates="w3m elinks links lynx"
113 fi
114 # SECURITYSESSIONID indicates an OS X GUI login session
115 if test -n "$SECURITYSESSIONID" \
@@ -140,7 +140,7 @@ else
140 fi
141
142 case "$browser" in
143 -firefox|iceweasel)
143 +firefox|iceweasel|seamonkey|iceape)
144 # Check version because firefox < 2.0 does not support "-new-tab".
145 vers=$(expr "$($browser_path -version)" : '.* \([0-9][0-9]*\)\..*')
146 NEWTAB='-new-tab'
@@ -168,13 +168,13 @@ konqueror)
168 ;;
169 esac
170 ;;
171 -w3m|links|lynx|open)
171 +w3m|elinks|links|lynx|open)
172 eval "$browser_path" "$@"
173 ;;
174 start)
175 exec "$browser_path" '"web-browse"' "$@"
176 ;;
177 -dillo)
177 +opera|dillo)
178 "$browser_path" "$@" &
179 ;;
180 *)