Why does my PowerShell belief it's a Cygwin terminal?

0

Lately I discovered that colorama* does not work as intended. It does not convert ANSI escape sequences into WinAPI calls to change the PoSh console text colors. I noticed that it works correct in an old cmd console but not in PowerShell.

I also noticed that colorama works as intended if I call the init function with the convert parameter: colorama.init(convert=True). Normally, colorama automatically recognizes Windows consoles.

To do so, colorama tests for a environment variable named TERM. My PowerShell returns cygwin!

How can I find the Cygwin installation that sets this variable?

Notes:

  • TERM is not set in cmd consoles
  • I never installed a standalone Cygwin, but many of my installed tools bring their own Cygwin folders/installations (> 6)
  • deinstalling these tools is no option

In a current workound, I delete env:TERM in each PS session.


  • colorama is a console wrapper written in/for Python to enable colored text outputs on Linux and Windows.

Paebbels

Posted 2015-11-16T22:24:51.120

Reputation: 170

Does TERM show up in the environment variable lists in the Windows GUI? If so, that's most likely where it's coming from each time you start PS. – Ƭᴇcʜιᴇ007 – 2015-11-16T22:31:18.860

No it's not in the environment variables window. Otherwise it would be set on cmd and PoSh sessions. There is also no other variable hinting to a paticular cygwin installation. – Paebbels – 2015-11-16T22:40:00.960

I search my registry, but there is no TERM or cygwin value declared. So it should be set by an script. – Paebbels – 2015-11-19T10:23:13.657

No answers