This is the mail archive of the
mailing list for the Cygwin project.
Re: Detect mintty in .zshrc?
On 3/4/2011 7:26 AM, Andy Koppe wrote:
> On 3 March 2011 18:31, Rafael Kitover wrote:
>> I put this block at the top of my .zshrc:
>> if [ "$TERM" = "cygwin" -o "$TERM" = "dumb" ]; then
>> export RUNNING_IN_CONSOLE=1
>> export TERM=cygwin
>> later I switch on "$RUNNING_IN_CONSOLE" to see if I'm in a real console.
> How come you need to guard against TERM==dumb? Cygwin shouldn't set it to that.
When I installed SUA (and haven't played with it yet) it for some reason
set TERM=dumb in my control panel env vars. Cygwin apparently only sets
it to 'cygwin' if it's initially unset, which makes sense.
In addition, the native Perl readline implementation only turns on if
TERM is unset or is set to 'dumb', for some reason, so I have aliases in
my .zshrc to run scripts with TERM=dumb where I want the readline to be
on for ActivePerl/Strawberry.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple