Merge branch 'lt/dir-cleanup'
[gitweb.git] / git-web--browse.sh
index 384148a59fc492d8fb1d6ea4fc4532aa1e5ffc22..4f5c740df5651853e575ba68366152992b0f043d 100755 (executable)
@@ -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 -x /bin/start; then
+       browser_candidates="start $browser_candidates"
+    fi
 
     for i in $browser_candidates; do
        init_browser_path $i
@@ -160,6 +164,9 @@ case "$browser" in
     w3m|links|lynx|open)
        eval "$browser_path" "$@"
        ;;
+    start)
+        exec "$browser_path" '"web-browse"' "$@"
+        ;;
     dillo)
        "$browser_path" "$@" &
        ;;