currentEnvironment

Returns the string of the name of the current terminal environment, adjusted to include Cygwin as an alternative next to win32 and win64, as well as embedded terminal consoles like in Visual Studio Code.

@safe
currentEnvironment
()

Return Value

Type: auto

String name of the current platform.

Examples

switch (currentEnvironment)
{
case "Cygwin":
case "vscode":
    // Special code for the terminal not being a conventional terminal
    // (instead acting like a pager)
    break;

default:
    // Code for normal terminal
    break;
}