X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: References: <416096c60910161104t1d5c1174oab298aeea800cdbf AT mail DOT gmail DOT com> Date: Sat, 17 Oct 2009 07:20:07 +0100 Message-ID: <416096c60910162320j2322969dq235f71396d00d329@mail.gmail.com> Subject: Re: [ANNOUNCEMENT] Updated: mintty-0.5.1-1 From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 2009/10/17 Eric Backus: > In passing, I'll note that xterm on my very old and out-of-date SuSE linux > installation uses DEL, so matches your new version of mintty Yeah, I think the GNU people managed to browbeat Linux distros into standardising on ^? some time ago. >> The workaround is to stick the following somewhere in your startup files: >> >> echo $'\e[?67h' >> stty erase '^H' > > Sure, if I know that the terminal that I'm using is mintty, that is a good > workaround. =C2=A0But I try to use the same .profile on both my linux and= cygwin > environments, and I'd prefer it to work with other terminals than just > mintty. =C2=A0If there was a portable way to determine whether I'm runnin= g within > mintty, I could use the above escape sequence, but I don't know of a good= way > to determine if I'm in mintty. =C2=A0The 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?". You could change it though, e.g.: mintty env TERM=3Dmintty /bin/bash -l And then have a bit in your .profile that checks for that TERM setting and changes it to xterm afterwards. 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. 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? Andy -- 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