From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13388 invoked by alias); 25 May 2012 04:42:09 -0000 Received: (qmail 13375 invoked by uid 22791); 25 May 2012 04:42:07 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_HR X-Spam-Check-By: sourceware.org Received: from mail-gh0-f171.google.com (HELO mail-gh0-f171.google.com) (209.85.160.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 May 2012 04:41:55 +0000 Received: by ghy10 with SMTP id 10so381974ghy.2 for ; Thu, 24 May 2012 21:41:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.143.106 with SMTP id k70mr1356792yhj.38.1337920914760; Thu, 24 May 2012 21:41:54 -0700 (PDT) Received: by 10.101.213.24 with HTTP; Thu, 24 May 2012 21:41:54 -0700 (PDT) In-Reply-To: References: Date: Fri, 25 May 2012 06:56:00 -0000 Message-ID: Subject: Re: Bashrc distinguish between mintty and x-windows xterm From: Andrew Hancock To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-05/txt/msg00552.txt.bz2 Buchbinder, Barry (NIH/NIAID) [E] niaid.nih.gov> writes: > > # Only set ThisTerm if not set. > if [ -z "${ThisTerm}" ] > then >=A0=A0 if [ ${PPID} =3D 1 ] >=A0=A0 then >=A0=A0=A0=A0 ThisTerm=3Dcmd >=A0=A0 else >=A0=A0=A0=A0 if [ "$(cat /proc/${PPID}/exename)" =3D '/usr/bin/mintty' ] >=A0=A0=A0=A0 then >=A0=A0=A0=A0=A0=A0 ThisTerm=3Dmintty >=A0=A0=A0=A0 else >=A0=A0=A0=A0=A0=A0 # not minty, not cmd, so xterm >=A0=A0=A0=A0=A0=A0 ThisTerm=3Dxterm >=A0=A0=A0=A0 fi >=A0=A0 fi > fi > > Then set colors by the value of ThisTerm. Barry, it works flawlessly.=A0 Thanks immensely! -- 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