Skip to content

Avoid using escape sequences tricks when TERM=dumb #14594

@Link1J

Description

@Link1J

Summary of the new feature/enhancement

When the environment variable TERM is set to dumb, avoid using escape sequences tricks as they make using the prompt impossible.
I know this is an unlikely situation, as most terminal emulators have support for escape sequences.

The pictures are to help show how a few different ways PowerShell currently handles TERM=dumb.
Linux appears to attempt to follow along with the request (Picture 2), but doesn't go all the way.
Windows (Picture 1) does nothing. Not really surprising, as Windows didn't really need to tell terminal emulators apart.

SSHed into a Windows Machine

Powershell does not like playing dumb

Arch Linux Machine

Powershell does not like playing dumb 3

And here is PowerShell descends into madness. It is likely caused by the fact the PowerShell is still expecting escape sequences to work correctly.
Powershell does not like playing dumb 2

Proposed technical implementation details (optional)

When the environment variable TERM is set to dumb, avoid using escape sequences tricks. Only escape sequences tricks used internally by PowerShell should be effected. If a user profile or external script uses them, PowerShell should not remove the escape sequences.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions