ITerminalInfo
Exposes terminal capabilities for custom IReplInteractionHandler implementations. Register or resolve via DI to adapt prompts to the current terminal environment.
- Kind:
Interface - Namespace: Repl.Interaction
- Assembly:
Repl.Core - Source: src/Repl.Core/Interaction/ITerminalInfo.cs
Signature
Section titled “Signature”public interface ITerminalInfoProperties
Section titled “Properties”CanReadKeys
Section titled “CanReadKeys”Gets a value indicating whether the process can read individual key presses (i.e. stdin is not redirected and no hosted session is active).
bool CanReadKeys { get; }Returns
Section titled “Returns”IsAnsiSupported
Section titled “IsAnsiSupported”Gets a value indicating whether the terminal supports ANSI escape sequences.
bool IsAnsiSupported { get; }Returns
Section titled “Returns”Palette
Section titled “Palette”Gets the active ANSI color palette, or null when ANSI is disabled.
AnsiPalette? Palette { get; }Returns
Section titled “Returns”WindowSize
Section titled “WindowSize”Gets the current terminal window size, or null when unavailable.
(int Width, int Height)? WindowSize { get; }Returns
Section titled “Returns”(int Width, int Height)?