Skip to content

Commit

Permalink
Merge branch 'rs/web-browse-xdg-open'
Browse files Browse the repository at this point in the history
* rs/web-browse-xdg-open:
  web--browse: Add support for xdg-open
  • Loading branch information
Junio C Hamano committed Nov 1, 2013
2 parents fbaa226 + 6ca0f80 commit c9bb7d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Documentation/git-web--browse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ The following browsers (or commands) are currently supported:
* open (this is the default under Mac OS X GUI)
* start (this is the default under MinGW)
* cygstart (this is the default under Cygwin)
* xdg-open

Custom commands may also be specified.

Expand Down
6 changes: 3 additions & 3 deletions git-web--browse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ valid_tool() {
firefox | iceweasel | seamonkey | iceape | \
chrome | google-chrome | chromium | chromium-browser | \
konqueror | opera | w3m | elinks | links | lynx | dillo | open | \
start | cygstart)
start | cygstart | xdg-open)
;; # happy
*)
valid_custom_tool "$1" || return 1
Expand Down Expand Up @@ -112,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
Expand Down Expand Up @@ -179,7 +179,7 @@ konqueror)
;;
esac
;;
w3m|elinks|links|lynx|open|cygstart)
w3m|elinks|links|lynx|open|cygstart|xdg-open)
"$browser_path" "$@"
;;
start)
Expand Down

0 comments on commit c9bb7d0

Please sign in to comment.