VirtualTerminalEnableVirtualTerminalSequences Method

Enables virtual terminal sequences for the console attached to the specified stream.

Definition

Namespace: Ookii.CommandLine.Terminal
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public static VirtualTerminalSupport EnableVirtualTerminalSequences(
	StandardStream stream
)

Parameters

stream  StandardStream
The StandardStream to enable VT sequences for.

Return Value

VirtualTerminalSupport
An instance of the VirtualTerminalSupport class that will disable virtual terminal support when disposed or destructed. Use the VirtualTerminalSupportIsSupported property to check if virtual terminal sequences are supported.

Remarks

Virtual terminal sequences are supported if the specified stream is not redirected, and the TERM environment variable is not set to "dumb". On Windows, enabling VT support has to succeed. On non-Windows platforms, VT support is assumed if the TERM environment variable is defined.

For StandardStreamInput, this method does nothing and always returns .

See Also