threads / patch / 30597

patchgit-web--browse: Fix open HTML help pages from iTerm

Subject: [PATCH] git-web--browse: Fix open HTML help pages from iTerm

## tl;dr

One message between May 23, 2012 and May 23, 2012. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Steffen Prohaska· May 23, 2012, 04:10 UTC · lore

iTerm is an alternative to the default terminal emulation program on Mac OS X. git-web--browse wasn't aware of iTerm and failed to open HTML help pages when used in a shell session running in iTerm, reporting "No known browser available." Now it works as expected and opens HTML pages.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 git-web--browse.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to git-web--browse.sh +2 −1
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 1e82726..95ecf65 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -120,7 +120,8 @@ if test -z "$browser" ; then
 	fi
 	# SECURITYSESSIONID indicates an OS X GUI login session
 	if test -n "$SECURITYSESSIONID" \
-		-o "$TERM_PROGRAM" = "Apple_Terminal" ; then
+		-o "$TERM_PROGRAM" = "Apple_Terminal" \
+		-o "$TERM_PROGRAM" = "iTerm.app" ; then
 		browser_candidates="open $browser_candidates"
 	fi
 	# /bin/start indicates MinGW
-- 
1.7.10.2.554.g7af14ee

← back to recent threads