summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-11-01 07:38:56 -0700
committerJunio C Hamano <gitster@pobox.com>2013-11-01 07:38:56 -0700
commitc9bb7d040a266e8562e56f3ad0a375582f1d6f6f (patch)
treef0652e6aa66d8f519935240b24b8b1aeba5cf1d6
parentfbaa22678b10061bcbcc3ed8ed366931c39e6301 (diff)
parent6ca0f80b6c4d17843a9773d5fd909395f786731d (diff)
downloadgit-c9bb7d040a266e8562e56f3ad0a375582f1d6f6f.tar.gz
Merge branch 'rs/web-browse-xdg-open'
* rs/web-browse-xdg-open: web--browse: Add support for xdg-open
-rw-r--r--Documentation/git-web--browse.txt1
-rwxr-xr-xgit-web--browse.sh6
2 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/git-web--browse.txt b/Documentation/git-web--browse.txt
index 5aec4ecffb..2de575f5be 100644
--- a/Documentation/git-web--browse.txt
+++ b/Documentation/git-web--browse.txt
@@ -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.
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 1d72ec760e..ebdfba6c94 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -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
@@ -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
@@ -179,7 +179,7 @@ konqueror)
;;
esac
;;
-w3m|elinks|links|lynx|open|cygstart)
+w3m|elinks|links|lynx|open|cygstart|xdg-open)
"$browser_path" "$@"
;;
start)