summaryrefslogtreecommitdiff
path: root/git-web--browse.sh
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2013-06-21 02:24:32 -0500
committerJunio C Hamano <gitster@pobox.com>2013-06-21 09:05:15 -0700
commitcc2f6b686575e2b7664d22d1266fc55197bc7e81 (patch)
tree01d46f74daafc213e108779c1ccba1a234e2b990 /git-web--browse.sh
parentc0add3073a5bd0e295cdaea76e5c9b7805f8a047 (diff)
downloadgit-cc2f6b686575e2b7664d22d1266fc55197bc7e81.tar.gz
web--browse: support /usr/bin/cygstart on Cygwin
While both GUI and console Cygwin browsers do exist, anecdotal evidence suggests most users rely on their native Windows browser. cygstart, which is a long-standing part of the base Cygwin installation, will cause the page to be opened in the default Windows browser (the one registered to open .html files). Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-web--browse.sh')
-rwxr-xr-xgit-web--browse.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 9f446798d4..1d72ec760e 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -32,8 +32,9 @@ valid_custom_tool()
valid_tool() {
case "$1" in
firefox | iceweasel | seamonkey | iceape | \
- chrome | google-chrome | chromium | chromium-browser |\
- konqueror | opera | w3m | elinks | links | lynx | dillo | open | start)
+ chrome | google-chrome | chromium | chromium-browser | \
+ konqueror | opera | w3m | elinks | links | lynx | dillo | open | \
+ start | cygstart)
;; # happy
*)
valid_custom_tool "$1" || return 1
@@ -127,6 +128,10 @@ if test -z "$browser" ; then
if test -x /bin/start; then
browser_candidates="start $browser_candidates"
fi
+ # /usr/bin/cygstart indicates Cygwin
+ if test -x /usr/bin/cygstart; then
+ browser_candidates="cygstart $browser_candidates"
+ fi
for i in $browser_candidates; do
init_browser_path $i
@@ -174,7 +179,7 @@ konqueror)
;;
esac
;;
-w3m|elinks|links|lynx|open)
+w3m|elinks|links|lynx|open|cygstart)
"$browser_path" "$@"
;;
start)