@matheusbsbs / matheus-bagliano / commits / 3b9b1163c0
Fork 0

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. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Petr Baudis committed Sep 24, 2008 at 23:52 UTC 3b9b1163c0a316c50715c6bd7c731b4703f89f55
2 files changed +7 -2
Documentation/git-web--browse.txt
+1
@@ -26,6 +26,7 @@ The following browsers (or commands) are currently supported:
26 * lynx
27 * dillo
28 * open (this is the default under Mac OS X GUI)
29 +* start (this is the default under MinGW)
30
31 Custom commands may also be specified.
32
git-web--browse.sh
+6 -2
@@ -31,7 +31,7 @@ valid_custom_tool()
31
32 valid_tool() {
33 case "$1" in
34 - firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open)
34 + firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open | start)
35 ;; # happy
36 *)
37 valid_custom_tool "$1" || return 1
@@ -114,6 +114,10 @@ if test -z "$browser" ; then
114 if test -n "$SECURITYSESSIONID"; then
115 browser_candidates="open $browser_candidates"
116 fi
117 + # /bin/start indicates MinGW
118 + if test -n /bin/start; then
119 + browser_candidates="start $browser_candidates"
120 + fi
121
122 for i in $browser_candidates; do
123 init_browser_path $i
@@ -157,7 +161,7 @@ case "$browser" in
161 ;;
162 esac
163 ;;
160 - w3m|links|lynx|open)
164 + w3m|links|lynx|open|start)
165 eval "$browser_path" "$@"
166 ;;
167 dillo)