Skip to contentSkip to conversation

web--browse: support /usr/bin/cygstart on Cygwin

PATCH In review Yaakov (Cygwin/X) 2 participants 4 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 web--browse: support /usr/bin/cygstart on Cygwin

From: Yaakov Selkowitz <[email protected]>

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).

---
 Documentation/git-web--browse.txt | 1 +
 git-web--browse.sh                | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)
Documentation/git-web--browse.txt +1 -0
index ba79cb4..5aec4ec 100644
@@ -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.
 
git-web--browse.sh +7 -2
index 9f44679..9fc1dba 100755
@@ -33,7 +33,8 @@ valid_tool() {
 	case "$1" in
 	firefox | iceweasel | seamonkey | iceape | \
 	chrome | google-chrome | chromium | chromium-browser |\
-	konqueror | opera | w3m | elinks | links | lynx | dillo | open | start)
+	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)
Signature · 1 line
1.8.3
#1 lore raw
Quoted 9 lines · Yaakov (Cygwin/X)

From: Yaakov Selkowitz <[email protected]>

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).

Will queue and wait for somebody from Cygwin land to comment.

Thanks.

#2 lore raw
Quoted 11 lines · Junio C Hamano
Quoted 9 lines

From: Yaakov Selkowitz <[email protected]>

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).

Will queue and wait for somebody from Cygwin land to comment.

Ping? Is there someone in particular whose input you are looking for?

Yaakov

#3 lore raw
Quoted 5 lines · Yaakov (Cygwin/X)
Quoted 3 lines
Quoted 1 line

Will queue and wait for somebody from Cygwin land to comment.

Ping? Is there someone in particular whose input you are looking for?

Nobody in particular. Nobody complained nor reported breakages, so we are good to go ;-)

Thanks.