{"thread":{"id":"35207","subject":"[PATCH] web--browse: Add support for xdg-open.","startedAt":"2013-10-26T17:43:54Z","lastAt":"2013-10-26T17:43:54Z","messageCount":1,"participants":["Rüdiger Sonderfeld"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"229570","messageId":"4642757.rY5h83ya4f@descartes","threadId":"35207","inReplyTo":null,"subject":"[PATCH] web--browse: Add support for xdg-open.","fromName":"Rüdiger Sonderfeld","fromEmail":"ruediger@c-plusplus.de","sentAt":"2013-10-26T17:43:54Z","receivedAt":"2013-10-26T17:43:54Z","isPatch":true,"sender":{"key":"ruediger@c-plusplus.de","avatar":"https://avatars.githubusercontent.com/u/1803?v=4"},"body":"xdg-open is a tool similar to git-web--browse.  It opens a file or URL in the\nuser's preferred application.  It could probably be made default at least on\nLinux with a graphical environment.\n\nSigned-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>\n---\n Documentation/git-web--browse.txt | 1 +\n git-web--browse.sh                | 6 +++---\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-web--browse.txt b/Documentation/git-web--browse.txt\nindex 5aec4ec..2de575f 100644\n--- a/Documentation/git-web--browse.txt\n+++ b/Documentation/git-web--browse.txt\n@@ -35,6 +35,7 @@ The following browsers (or commands) are currently supported:\n * open (this is the default under Mac OS X GUI)\n * start (this is the default under MinGW)\n * cygstart (this is the default under Cygwin)\n+* xdg-open\n \n Custom commands may also be specified.\n \ndiff --git a/git-web--browse.sh b/git-web--browse.sh\nindex 1d72ec7..ebdfba6 100755\n--- a/git-web--browse.sh\n+++ b/git-web--browse.sh\n@@ -34,7 +34,7 @@ valid_tool() {\n \tfirefox | iceweasel | seamonkey | iceape | \\\n \tchrome | google-chrome | chromium | chromium-browser | \\\n \tkonqueror | opera | w3m | elinks | links | lynx | dillo | open | \\\n-\tstart | cygstart)\n+\tstart | cygstart | xdg-open)\n \t\t;; # happy\n \t*)\n \t\tvalid_custom_tool \"$1\" || return 1\n@@ -112,7 +112,7 @@ fi\n \n if test -z \"$browser\" ; then\n \tif test -n \"$DISPLAY\"; then\n-\t\tbrowser_candidates=\"firefox iceweasel google-chrome chrome chromium chromium-browser konqueror opera seamonkey iceape w3m elinks links lynx dillo\"\n+\t\tbrowser_candidates=\"firefox iceweasel google-chrome chrome chromium chromium-browser konqueror opera seamonkey iceape w3m elinks links lynx dillo xdg-open\"\n \t\tif test \"$KDE_FULL_SESSION\" = \"true\"; then\n \t\t\tbrowser_candidates=\"konqueror $browser_candidates\"\n \t\tfi\n@@ -179,7 +179,7 @@ konqueror)\n \t\t;;\n \tesac\n \t;;\n-w3m|elinks|links|lynx|open|cygstart)\n+w3m|elinks|links|lynx|open|cygstart|xdg-open)\n \t\"$browser_path\" \"$@\"\n \t;;\n start)\n-- \n1.8.4.1\n"}]}