This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: mintty-0.5.1-1

Andy Koppe <andy.koppe <at>> 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.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]