Skip to content

Setting the TERM environment variable to 'xtermm' or 'xterm-mono' breaks command-line editing on Unix-like platforms #16060

@mklement0

Description

@mklement0

Prerequisites

Steps to reproduce

Related: #16059

Note: While setting the NO_COLOR environment variable is the best choice for disabling VT (ANSI) escape sequence use by PowerShell's output-formatting system. without affecting terminal functionality, there's no reason why setting TERM to xtermm or xterm-mono or unknown values should break command-line editing on Unix-like platforms.

# On Unix
sh -c 'TERM=xterm-mono pwsh -nop -noexit -c ''Get-Item /'''

Note:

  • xtermm is less ill-behaved with respect typing commands on the command line, but still broken with respect to command recall, for instance.

  • an unknown value, such as nosuch, produces yet different symptoms.

Expected behavior

  • The Get-Item / command's output should print without colors.

  • Command-line editing should function normally.

Actual behavior

  • Command-line editing is broken.

Error details

No response

Environment data

PowerShell Core 7.2.0-preview.9, on Unix.

Visuals

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions