All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Improve git-help--browse browser support under OS X
@ 2008-02-08 21:23 jaysoffian+git
  2008-02-09 20:20 ` Dmitry Potapov
  2008-02-11  2:24 ` [PATCH] git-web--browse: improve " jaysoffian+git
  0 siblings, 2 replies; 17+ messages in thread
From: jaysoffian+git @ 2008-02-08 21:23 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian

/usr/bin/open <document> 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 <jaysoffian@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-02-14  5:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-08 21:23 [PATCH] Improve git-help--browse browser support under OS X jaysoffian+git
2008-02-09 20:20 ` Dmitry Potapov
2008-02-10  2:15   ` Jay Soffian
2008-02-10 12:43     ` Dmitry Potapov
2008-02-10 13:45       ` Christian Couder
2008-02-11  2:13         ` Jay Soffian
2008-02-11  5:03           ` Christian Couder
2008-02-11  2:10       ` Jay Soffian
2008-02-11  2:24 ` [PATCH] git-web--browse: improve " jaysoffian+git
2008-02-11  3:01   ` Junio C Hamano
2008-02-11 14:15     ` Jay Soffian
2008-02-12 16:40     ` Jay Soffian
2008-02-13  6:55       ` Christian Couder
2008-02-13 22:14         ` Junio C Hamano
2008-02-13 22:46           ` Pieter de Bie
2008-02-14  0:13             ` Jay Soffian
2008-02-14  5:09               ` Christian Couder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.