X-Recipient: archive-cygwin AT delorie DOT com 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 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 25 May 2012 00:41:54 -0400 Message-ID: Subject: Re: Bashrc distinguish between mintty and x-windows xterm From: Andrew Hancock To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q4P4gFxC020400 Buchbinder, Barry (NIH/NIAID) [E] niaid.nih.gov> writes: > > # Only set ThisTerm if not set. > if [ -z "${ThisTerm}" ] > then >   if [ ${PPID} = 1 ] >   then >     ThisTerm=cmd >   else >     if [ "$(cat /proc/${PPID}/exename)" = '/usr/bin/mintty' ] >     then >       ThisTerm=mintty >     else >       # not minty, not cmd, so xterm >       ThisTerm=xterm >     fi >   fi > fi > > Then set colors by the value of ThisTerm. Barry, it works flawlessly.  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