delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/03/07:21:32

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_20,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4D6F690F.9010100@cpan.org>
References: <4D6F690F DOT 9010100 AT cpan DOT org>
Date: Thu, 3 Mar 2011 12:21:17 +0000
Message-ID: <AANLkTimSwLjFOPk=v7HKfzjm1hdv+4MWfNBPEVYfsGbD@mail.gmail.com>
Subject: Re: Detect mintty in .zshrc?
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: rkitover AT cpan DOT org, cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 3 March 2011 10:10, Rafael Kitover wrote:
> I was wondering if there's a way in my .zshrc to determine if the shell
> is running in mintty or in a regular windows console.

Check $TERM. It defaults to 'xterm' in mintty and 'cygwin' in the console.

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019