Re: [PATCH] git-web--browse: recognize iTerm as a GUI terminal on OS X
On Wed, Mar 27, 2013 at 10:43 AM, Junio C Hamano gits...@pobox.com wrote: [snip] If that approach is better than what you originally sent, then yes. But I do not use OS X, so you may need to pay attention to possible complaints and comments from other Mac users on this list for a while---there may be people who run the program in question without that environment variable. Sorry it has taken me so long to get back to this. I searched around and tried out a few terminal programs that are available, and I think what you queued--checking that TERM_PROGRAM is non-empty--is the right fix. Thanks! -John -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-web--browse: recognize iTerm as a GUI terminal on OS X
John Szakmeister j...@szakmeister.net writes: Sorry about the repeat Junio, I meant to hit Reply to All. On Mon, Mar 25, 2013 at 5:44 PM, Junio C Hamano gits...@pobox.com wrote: [snip] Your patch makes me wonder if test -n $TERM_PROGRAM without any SECURITYSESSIONID or explicit program name checks should suffice, though. So, after downloading a couple of other terminals and trying things out, I think you're suggestion does suffice. Should I send an updated patch? If that approach is better than what you originally sent, then yes. But I do not use OS X, so you may need to pay attention to possible complaints and comments from other Mac users on this list for a while---there may be people who run the program in question without that environment variable. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-web--browse: recognize iTerm as a GUI terminal on OS X
It turns out that the presence of SECURITYSESSIONID is not sufficient for detecting the presence of a GUI under Mac OS X. SECURITYSESSIONID appears to only be set when the user has Screen Sharing enabled. Disabling Screen Sharing and relaunching the shell showed that the variable was missing, at least under Mac OS X 10.6.8. As a result, let's check for iTerm directly via TERM_PROGRAM. Signed-off-by: John Szakmeister j...@szakmeister.net --- On Sun, Mar 24, 2013 at 10:05:53PM +0100, Christian Couder wrote: [snip] Your patch looks good to me, and I cannot really test it as I don't have a Mac. Could you just had some of the explanations you gave above to the commit message? Here's an updated patch. I also noticed that git-bisect.sh is also trying to determine if a GUI is present by looking for SECURITYSESSIONID as well. I wonder if it would be better to create a shell function in git-sh-setup.sh that the two scripts could use? -John git-web--browse.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-web--browse.sh b/git-web--browse.sh index 1e82726..1ff5379 100755 --- a/git-web--browse.sh +++ b/git-web--browse.sh @@ -120,6 +120,7 @@ if test -z $browser ; then fi # SECURITYSESSIONID indicates an OS X GUI login session if test -n $SECURITYSESSIONID \ + -o $TERM_PROGRAM = iTerm.app \ -o $TERM_PROGRAM = Apple_Terminal ; then browser_candidates=open $browser_candidates fi -- 1.8.2 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-web--browse: recognize iTerm as a GUI terminal on OS X
On Mon, Mar 25, 2013 at 11:13 AM, John Szakmeister j...@szakmeister.net wrote: Here's an updated patch. Thank you for it. For what it's worth: Acked-by: Christian Couder chrisc...@tuxfamily.org I also noticed that git-bisect.sh is also trying to determine if a GUI is present by looking for SECURITYSESSIONID as well. I wonder if it would be better to create a shell function in git-sh-setup.sh that the two scripts could use? Yeah, it might be a good idea to have some common functions to determine if a GUI is present. Maybe you could start with an os_x_gui_present() function in another patch on top of this one. Thanks, Christian. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html