Merge branch 'maint'
[gitweb.git] / git-web--browse.sh
index 9f446798d473cee7dedc82d5d2c820cb0967b375..ebdfba6c94db947f66add0c1b4840319c12252ea 100755 (executable)
@@ -32,8 +32,9 @@ valid_custom_tool()
 valid_tool() {
        case "$1" in
        firefox | iceweasel | seamonkey | iceape | \
-       chrome | google-chrome | chromium | chromium-browser |\
-       konqueror | opera | w3m | elinks | links | lynx | dillo | open | start)
+       chrome | google-chrome | chromium | chromium-browser | \
+       konqueror | opera | w3m | elinks | links | lynx | dillo | open | \
+       start | cygstart | xdg-open)
                ;; # happy
        *)
                valid_custom_tool "$1" || return 1
@@ -111,7 +112,7 @@ fi
 
 if test -z "$browser" ; then
        if test -n "$DISPLAY"; then
-               browser_candidates="firefox iceweasel google-chrome chrome chromium chromium-browser konqueror opera seamonkey iceape w3m elinks links lynx dillo"
+               browser_candidates="firefox iceweasel google-chrome chrome chromium chromium-browser konqueror opera seamonkey iceape w3m elinks links lynx dillo xdg-open"
                if test "$KDE_FULL_SESSION" = "true"; then
                        browser_candidates="konqueror $browser_candidates"
                fi
@@ -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|xdg-open)
        "$browser_path" "$@"
        ;;
 start)