console-rs / console

A rust console and terminal abstraction
MIT License
961 stars 113 forks source link

Missing emoji support for VSCode #207

Open Sofahamster opened 9 months ago

Sofahamster commented 9 months ago

Issue

The current detection of emoji support on Windows (wants_emoji() in windows_term/mod.rs) only works for Windows Terminal.

It would be nice if the integrated terminal of VSCode would be detected and supported. The VSCode terminal has unicode and emoji support similar to Windows Terminal.

Workaround

A workaround exists by manually setting the "WT_SESSION" environment variable, but that seems like a bad hack.

Suggested solution

VSCode already sets the environment variable "TERM_PROGRAM" to the value "vscode". This value could be checked in the wants_emoji() function to enable emoji support for VSCode.