www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/25/20:30:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A44167B.2070702@aim.com>
Date: Thu, 25 Jun 2009 20:29:47 -0400
From: Mark Harig <idirectscm AT aim DOT com>
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Problem with mintty-0.4.1-1 and orpie
X-AOL-IP: 64.12.78.137
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

Thu, 25 Jun 2009 20:25:09 +0100 Andy Kope wrote:

> >
> > There is no documented way in mintty to change the TERM environment before
> > the shell is started.
>
> There's a bit in the TIPS section of the manual on how to set any
> environment variable using the shell's -c option, e.g.:
>
> mintty sh -c "TERM=xterm-256color emacs"
>   

OK.  When I wrote my comments, I had been thinking about
the shell (which ever one the user chooses) itself and had
not thought of using 'sh -c' on it.  The following works:

    mintty sh -c "FOO=baz  /bin/bash --norc --noprofile"


bash-3.2$ echo $FOO
baz

However, with this approach there is this side effect
that users should probably be aware of:

bash-3.2$ echo $SHLVL
2

> From the 0.4.0 release announcement:
>
> - MinTTY now has its own identity, instead of pretending to be an old
> xterm. The ^E answerback string is "mintty", the ^[[c primary device
> attribute command reports a vt100, and the ^[[>c secondary DA command
> reports terminal type 77 (ASCII 'M') and version 400. The TERM
> variable remains set to "xterm" though, to avoid termcap/terminfo trouble
>   

I could not find this description in the manual page for mintty
or in /usr/share/doc/Cygwin/mintty-0.4.1.README.  I assume
that you will add this information to the documentation when
you want users to be able to make use of it.


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