delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/21/20:39:42

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,TW_HR,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andy <AndyMHancock AT gmail DOT com>
Subject: Bashrc distinguish between mintty and x-windows xterm
Date: Tue, 22 May 2012 00:38:59 +0000 (UTC)
Lines: 8
Message-ID: <loom.20120522T023835-645@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

My bashrc sets the color of the prompt depending on $TERM.  My x-windows xterm
has a white background and the cygwin default terminal, which has a black
background, use to not have $TERM=xterm.  I could distinguish between them in
the bashrc script, and set the prompt colours accordingly.  Now with mintty
emulating an xterm, $TERM takes on the string "xterm" (but it has a black
background).  I would like to find a simple bash script way to tell the
difference between when bashrc is being called from a mintty versus an actual
x-windows xterm.  Can anyone suggest a way?


--
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