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.
3
  • 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. Commented Nov 16, 2015 at 22:31
  • 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
    Commented Nov 16, 2015 at 22:40
  • I search my registry, but there is no TERM or cygwin value declared. So it should be set by an script.
    – Paebbels
    Commented Nov 19, 2015 at 10:23

0

You must log in to answer this question.

Browse other questions tagged .