Merge branch 'rs/web-browse-xdg-open'

* rs/web-browse-xdg-open:
  web--browse: Add support for xdg-open
This commit is contained in:
Junio C Hamano 2013-11-01 07:38:56 -07:00
commit c9bb7d040a
2 changed files with 4 additions and 3 deletions

View File

@ -35,6 +35,7 @@ The following browsers (or commands) are currently supported:
* open (this is the default under Mac OS X GUI) * open (this is the default under Mac OS X GUI)
* start (this is the default under MinGW) * start (this is the default under MinGW)
* cygstart (this is the default under Cygwin) * cygstart (this is the default under Cygwin)
* xdg-open
Custom commands may also be specified. Custom commands may also be specified.

View File

@ -34,7 +34,7 @@ valid_tool() {
firefox | iceweasel | seamonkey | iceape | \ firefox | iceweasel | seamonkey | iceape | \
chrome | google-chrome | chromium | chromium-browser | \ chrome | google-chrome | chromium | chromium-browser | \
konqueror | opera | w3m | elinks | links | lynx | dillo | open | \ konqueror | opera | w3m | elinks | links | lynx | dillo | open | \
start | cygstart) start | cygstart | xdg-open)
;; # happy ;; # happy
*) *)
valid_custom_tool "$1" || return 1 valid_custom_tool "$1" || return 1
@ -112,7 +112,7 @@ fi
if test -z "$browser" ; then if test -z "$browser" ; then
if test -n "$DISPLAY"; 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 if test "$KDE_FULL_SESSION" = "true"; then
browser_candidates="konqueror $browser_candidates" browser_candidates="konqueror $browser_candidates"
fi fi
@ -179,7 +179,7 @@ konqueror)
;; ;;
esac esac
;; ;;
w3m|elinks|links|lynx|open|cygstart) w3m|elinks|links|lynx|open|cygstart|xdg-open)
"$browser_path" "$@" "$browser_path" "$@"
;; ;;
start) start)