git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
YCYaakov (Cygwin/X) <yselkowitz@users.sourceforge.net>
Date
Jun 21, 2013, 07:24 UTC
Message-ID
<1371799472-11564-1-git-send-email-yselkowitz@users.sourceforge.net>
From: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>

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>
---
 Documentation/git-web--browse.txt | 1 +
 git-web--browse.sh                | 9 +++++++--
 2 files changed, 8 insertions(+), 2 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..9fc1dba 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -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)
-- 
1.8.3
Next: Junio C Hamano
Message 1 of 4 in “web--browse: support /usr/bin/cygstart on Cygwin”
  1. web--browse: support /usr/bin/cygstart on CygwinYaakov (Cygwin/X), Jun 21, 2013
  2. Junio C HamanoJun 21, 2013
  3. Yaakov (Cygwin/X)Jul 23, 2013
  4. Junio C HamanoJul 25, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.