Skip to content

Consider setting environment variable when Terminal hosts cmd / powershell #840

@binarycrusader

Description

@binarycrusader

Windows Terminal has support for unicode character display, etc. that the old cmd / powershell windows do not. This makes it difficult to create a shell profile (such as Microsoft.Powershell_profile.ps1) that works compatibly with both the old cmd / powershell windows and the new Windows Terminal.

If an environment variable was set by Terminal when hosting cmd / powershell / wsl, etc. it would allow users to detect they are hosted by the new Terminal and then enable use of unicode character display, etc. compatibly.

For example, my powershell profile prompt has been altered to include some emojis. In the old powershell window, this happens:

image

In the new Windows Terminal:

image

I could make my profile compatible with both if I had an environment variable to check.

Metadata

Metadata

Labels

Area-InteropCommunication between processesIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions