This is the mail archive of the cygwin-patches 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: [PATCH] Cygwin: console, pty: Prevent error in legacy console mode.

On Wed, 6 Nov 2019 08:06:55 -0700
Brian Inglis wrote:
> > +      if (con.is_legacy)
> > +	setenv ("TERM", "cygwin", 1);
> >      }
> handlers should not be changing user's env vars: that is the user's selection to
> get their preferred operation in their apps.
> If you need to set TERM, shouldn't you also set it appropriately for non-legacy
> console?

The environment TERM is set to cygwin or xterm-256color in
based on wincap.has_con_24bit_colors().

However, if legacy console mode is enabled, new terminal capability
compatible with xterm is disabled. So TERM is override to cygwin by
the code above.

This is done only in the first initialization stage, so TERM value
set by user in .login, .bashrc, .tcshrc and etc, ... will be kept.

Only the case in which TERM is overrid is:
1) Enable console legacy mode.
2) Open command prompt.
3) set TERM
4) start cygwin

What situation do you assume this causes problem?

Takashi Yano <>

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