X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Backus Subject: Re: [ANNOUNCEMENT] Updated: mintty-0.5.1-1 Date: Sat, 17 Oct 2009 19:16:12 +0000 (UTC) Lines: 49 Message-ID: References: <416096c60910161104t1d5c1174oab298aeea800cdbf AT mail DOT gmail DOT com> <416096c60910162320j2322969dq235f71396d00d329 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 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 Andy Koppe gmail.com> writes: > > The obvious method would be to check $TERM, > > but of course that doesn't work... > > ... and I can't change it to "mintty", because even if entries for it > were added to Cygwin's termcap and terminfo, any other system would > say "what?". Yes. Though you could set a different variable ($MINTTY_VERSION perhaps) that would allow users to explicitly test whether they're running under mintty. I don't know if this is a good idea or not. Possibly better would be some generic variable (TERM_IMPLEMENTATION? TERM_EMULATOR? I can't think of anything that looks very good) that other programs could use too. > You could change it though, e.g.: > > mintty env TERM=mintty /bin/bash -l This is an excellent idea. Thanks! I ended up using: mintty --title=bash env MINTTY_VERSION=0.5.1 bash --login Then my .profile can test for MINTTY_VERSION and unset the variable when done. > Alternatively, mintty can be recognised by querying the "secondary > device attribute". If you send "\e[>c", it will currently reply with > "\e[>77;501;0c". The 77 (ASCII 'M') identifies mintty, the 501 is the > version number, and the last field is unused. Cool, I never knew about this. I can make it work, but things are a little messy so I'll stick with the environment variable method above. > Btw, how do you deal with the problem that the 'kbs' terminfo entry on > the remote machine doesn't necessarily fit the terminal on your local > machine? There's not much I can do about it, so I don't deal with it. I don't use terminals on remote machines very often, so it hasn't been a problem for me. I guess the long-term right answer is for everyone to agree on the same definition of what "xterm" really means. By the way, thanks for your efforts on mintty, it works really well and I have enjoyed using it. -- Eric -- 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