Skip to contentSkip to conversation

git-web--browse: Support for using /bin/start on MinGW

PATCH New Petr Baudis 1 participant 1 message Aug 13, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-web--browse: Support for using /bin/start on MinGW

In the future, I think we should also default to xdg-open on Linux instead of having a KDE-specific hack.

This patch has been sponsored by Novartis.

---
 Documentation/git-web--browse.txt |    1 +
 git-web--browse.sh                |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
Documentation/git-web--browse.txt +1 -0
index 7f7a45b..278cf73 100644
@@ -26,6 +26,7 @@ The following browsers (or commands) are currently supported:
 * lynx
 * dillo
 * open (this is the default under Mac OS X GUI)
+* start (this is the default under MinGW)
 
 Custom commands may also be specified.
 
git-web--browse.sh +6 -2
index 384148a..78d236b 100755
@@ -31,7 +31,7 @@ valid_custom_tool()
 
 valid_tool() {
 	case "$1" in
-		firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open)
+		firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open | start)
 			;; # happy
 		*)
 			valid_custom_tool "$1" || return 1
@@ -114,6 +114,10 @@ if test -z "$browser" ; then
     if test -n "$SECURITYSESSIONID"; then
 	browser_candidates="open $browser_candidates"
     fi
+    # /bin/start indicates MinGW
+    if test -n /bin/start; then
+	browser_candidates="start $browser_candidates"
+    fi
 
     for i in $browser_candidates; do
 	init_browser_path $i
@@ -157,7 +161,7 @@ case "$browser" in
 		;;
 	esac
 	;;
-    w3m|links|lynx|open)
+    w3m|links|lynx|open|start)
 	eval "$browser_path" "$@"
 	;;
     dillo)
Signature · 1 line
tg: (c427559..) t/web--browse/mingw (depends on: vanilla/master)