All of lore.kernel.org
 help / color / mirror / Atom feed
From: jaysoffian+git@gmail.com
To: git@vger.kernel.org
Cc: Jay Soffian <jaysoffian@gmail.com>
Subject: [PATCH] git-web--browse: improve browser support under OS X
Date: Sun, 10 Feb 2008 21:24:24 -0500	[thread overview]
Message-ID: <1202696664-1565-1-git-send-email-jaysoffian+git@gmail.com> (raw)
In-Reply-To: <1202505794-13409-1-git-send-email-jaysoffian+git@gmail.com>

From: Jay Soffian <jaysoffian@gmail.com>

/usr/bin/open <document> is used under OS X to open a document as if the
user had double-clicked on the file's icon (i.e. HTML files are opened
w/the user's default browser).

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
 Documentation/git-help.txt |    1 +
 git-web--browse.sh         |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt
index ad41aab..897868a 100644
--- a/Documentation/git-help.txt
+++ b/Documentation/git-help.txt
@@ -68,6 +68,7 @@ The following browsers are currently supported by 'git-web--browse':
 * links
 * lynx
 * dillo
+* open (OS X only, where it is the default)
 
 CONFIGURATION VARIABLES
 -----------------------
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 8ed489d..1927c3b 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 "$(uname)" = "Darwin" && 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.gf32f1

  parent reply	other threads:[~2008-02-11  2:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` jaysoffian+git [this message]
2008-02-11  3:01   ` [PATCH] git-web--browse: improve " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1202696664-1565-1-git-send-email-jaysoffian+git@gmail.com \
    --to=jaysoffian+git@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jaysoffian@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.