Skip to content

TerminalCommandMark ​

Namespace: Hex1b

Assembly: Hex1b.dll

Records a single OSC 133 shell-integration marker (prompt, command-line, executing, or finished) anchored to a specific row in the terminal's text history.

csharp
public sealed record TerminalCommandMark : IEquatable<TerminalCommandMark>

Inheritance ​

Object → TerminalCommandMark

Implements ​

Properties ​

CmdlineUrl ​

Gets the raw (still percent-encoded) cmdline_url value, or null when not present.

Returns: String

csharp
public string? CmdlineUrl { get; }

ExitCode ​

Gets the reported exit code, or null when this mark is not a finished marker with a reported code.

Returns: Nullable<Int32>

csharp
public int? ExitCode { get; }

HasCmdlineUrl ​

Gets whether a cmdline_url parameter was present on this marker.

Returns: Boolean

csharp
public bool HasCmdlineUrl { get; }

Parameters ​

Gets split into key/value pairs, parsed and cached on first access. Returns an empty dictionary when is null.

Returns: IReadOnlyDictionary<String, String>

csharp
public IReadOnlyDictionary<string, string> Parameters { get; }

Phase ​

Gets the shell-integration phase this mark reports.

Returns: TerminalShellIntegrationPhase

csharp
public TerminalShellIntegrationPhase Phase { get; }

RawParameters ​

Gets the raw, verbatim key=value[;key=value...] string trailing the marker, or null when none was present. This is captured as-is; it is the caller's responsibility to sanitize it for whatever context it is rendered or logged in.

Returns: String

csharp
public string? RawParameters { get; }

TextGeneration ​

Gets the text-history generation this mark was captured in. A mark can only be resolved to a row while the terminal's current text generation still matches this value.

Returns: Int64

csharp
public long TextGeneration { get; }

TextRowId ​

Gets the stable text-row identifier this mark is anchored to.

Returns: Int64

csharp
public long TextRowId { get; }

Remarks ​

This is history — a sequence of past markers — unlike , which reflects only the current phase. Marks are captured in a bounded list; marks are ordered oldest first. Marks are collected when their backing text is discarded, and the capacity also bounds how many can remain retained.

and are capture-time coordinates, not a live position. Browser navigation uses separate anchors which follow supported reflow. Retained main-buffer content is not discarded just because an alternate buffer becomes active. References already returned to callers remain immutable after collection.

Released under the MIT License.