From: jaysoffian+git@gmail.com Date: Fri, 08 Feb 2008 21:23:14 GMT Subject: [PATCH] Improve git-help--browse browser support under OS X Message-ID: <1202505794-13409-1-git-send-email-jaysoffian+git@gmail.com> /usr/bin/open is used under OS X to open a document just as if the user had double-clicked on the file's icon. In other words, this will open HTML files with the user's default browser. Note however that whether the document opens in a new window, or in a new tab depends upon the browser configuration. Signed-off-by: Jay Soffian --- git-web--browse.sh | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/git-web--browse.sh b/git-web--browse.sh index 8ed489d..938293a 100755 --- a/git-web--browse.sh +++ b/git-web--browse.sh @@ -25,7 +25,7 @@ NONGIT_OK=Yes valid_tool() { case "$1" in - firefox | iceweasel | konqueror | w3m | links | lynx | dillo) + firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open) ;; # happy *) return 1 @@ -104,6 +104,9 @@ if test -z "$browser" ; then else browser_candidates="w3m links lynx" fi + if test -n "$SECURITYSESSIONID"; then + browser_candidates="open $browser_candidates" + fi for i in $browser_candidates; do init_browser_path $i @@ -147,7 +150,7 @@ case "$browser" in ;; esac ;; - w3m|links|lynx) + w3m|links|lynx|open) eval "$browser_path" "$@" ;; dillo) -- 1.5.4.1221.g7a7a1