{"thread":{"id":"12098","subject":"[PATCH updated] git-help--browse: improve browser support under OS X","startedAt":"2008-02-14T08:36:14Z","lastAt":"2008-02-14T08:36:14Z","messageCount":1,"participants":["Jay Soffian"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"68722","messageId":"1202978174-77648-1-git-send-email-jaysoffian@gmail.com","threadId":"12098","inReplyTo":null,"subject":"[PATCH updated] git-help--browse: improve browser support under OS X","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2008-02-14T08:36:14Z","receivedAt":"2008-02-14T08:36:14Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"/usr/bin/open <document> is used under OS X to open a document as if the\nuser had double-clicked on the file's icon (i.e. HTML files are opened\nw/the user's default browser).\n\nSigned-off-by: Jay Soffian <jaysoffian@gmail.com>\nAcked-by: Christian Couder <chriscool@tuxfamily.org>\n---\nThis is the original patch, but based off master (help--browse instead\nof web--browse) per jh. I also added the comment about SECURITYSESSIONID\nenvironment variable per cc.\n\n git-help--browse.sh |    8 ++++++--\n 1 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/git-help--browse.sh b/git-help--browse.sh\nindex 10b0a36..84e37ef 100755\n--- a/git-help--browse.sh\n+++ b/git-help--browse.sh\n@@ -30,7 +30,7 @@ test -f \"$html_dir/git.html\" || die \"No documentation directory found.\"\n \n valid_tool() {\n \tcase \"$1\" in\n-\t\tfirefox | iceweasel | konqueror | w3m | links | lynx | dillo)\n+\t\tfirefox | iceweasel | konqueror | w3m | links | lynx | dillo | open)\n \t\t\t;; # happy\n \t\t*)\n \t\t\treturn 1\n@@ -94,6 +94,10 @@ if test -z \"$browser\" ; then\n     else\n \tbrowser_candidates=\"w3m links lynx\"\n     fi\n+    # SECURITYSESSIONID indicates an OS X GUI login session\n+    if test -n \"$SECURITYSESSIONID\"; then\n+\tbrowser_candidates=\"open $browser_candidates\"\n+    fi\n \n     for i in $browser_candidates; do\n \tinit_browser_path $i\n@@ -140,7 +144,7 @@ case \"$browser\" in\n \t\t;;\n \tesac\n \t;;\n-    w3m|links|lynx)\n+    w3m|links|lynx|open)\n \teval \"$browser_path\" $pages\n \t;;\n     dillo)\n-- \n1.5.4.1.1281.g75df\n"}]}