PowerShell-Docs icon indicating copy to clipboard operation
PowerShell-Docs copied to clipboard

Doc supported TERM env var values

Open SteveL-MSFT opened this issue 5 years ago • 1 comments

Summary of the new document or enhancement

  • List of articles that need to be updated:
  • New articles that need to be created:
  • Link(s) to related code PR(s) in the PowerShell/PowerShell repo: https://github.com/PowerShell/PowerShell/pull/14969
  • Link(s) to related issue(s) in the PowerShell/PowerShell repo: https://github.com/PowerShell/PowerShell/issues/14964

Description of what changed

Respect TERM env var where:

dumb set SupportsVirtualTerminal = false xterm-mono set $PSStyle.OutputRendering = PlainText xtermm set $PSStyle.OutputRendering = PlainText

if $env:NO_COLOR exists, set $PSStyle.OutputRendering = PlainText

Note that if you try this interactively, PSReadLine doesn't respect these two values so on screen output will be hard to read as it still emits colors and cursor movements. Created PowerShell/PSReadLine#2277 to track this.

This works on all platforms including Windows.

SteveL-MSFT avatar Mar 08 '21 15:03 SteveL-MSFT

That is a good idea

yaxye8123 avatar Mar 19 '21 06:03 yaxye8123