summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-26 22:08:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-26 22:08:01 (GMT)
commit12dd2f69337e29254e743aa6fb3b04937f302209 (patch)
tree704a020ca7241b984a05ff1972a2d41a6a51614f
parent0784466657d9d728a37c006ee96fac273ef31dbb (diff)
parentcc2f6b686575e2b7664d22d1266fc55197bc7e81 (diff)
downloadgit-12dd2f69337e29254e743aa6fb3b04937f302209.zip
git-12dd2f69337e29254e743aa6fb3b04937f302209.tar.gz
git-12dd2f69337e29254e743aa6fb3b04937f302209.tar.bz2
Merge branch 'ys/cygstart'
On Cygwin, recognize "cygstart" as a possible way to start a web browser (used in "help -w" and "instaweb" among others). * ys/cygstart: web--browse: support /usr/bin/cygstart on Cygwin
-rw-r--r--Documentation/git-web--browse.txt1
-rwxr-xr-xgit-web--browse.sh11
2 files changed, 9 insertions, 3 deletions
diff --git a/Documentation/git-web--browse.txt b/Documentation/git-web--browse.txt
index ba79cb4..5aec4ec 100644
--- a/Documentation/git-web--browse.txt
+++ b/Documentation/git-web--browse.txt
@@ -34,6 +34,7 @@ The following browsers (or commands) are currently supported:
* dillo
* open (this is the default under Mac OS X GUI)
* start (this is the default under MinGW)
+* cygstart (this is the default under Cygwin)
Custom commands may also be specified.
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 9f44679..1d72ec7 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)