diff options
author | RĂ¼diger Sonderfeld <ruediger@c-plusplus.de> | 2013-10-26 19:43:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-30 13:54:15 -0700 |
commit | 6ca0f80b6c4d17843a9773d5fd909395f786731d (patch) | |
tree | 6d98af9f92378a7f63d30157abb6aec3525bfce8 /git-web--browse.sh | |
parent | 12dd2f69337e29254e743aa6fb3b04937f302209 (diff) | |
download | git-6ca0f80b6c4d17843a9773d5fd909395f786731d.tar.gz |
web--browse: Add support for xdg-openrs/web-browse-xdg-open
xdg-open is a tool similar to git-web--browse. It opens a file or URL in the
user's preferred application. It could probably be made default at least on
Linux with a graphical environment.
Signed-off-by: RĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-web--browse.sh')
-rwxr-xr-x | git-web--browse.sh | 6 |
1 files changed, 3 insertions, 3 deletions
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) |