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.
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
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>
public int? ExitCode { get; }HasCmdlineUrl
Gets whether a cmdline_url parameter was present on this marker.
Returns: Boolean
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>
public IReadOnlyDictionary<string, string> Parameters { get; }Phase
Gets the shell-integration phase this mark reports.
Returns: TerminalShellIntegrationPhase
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
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
public long TextGeneration { get; }TextRowId
Gets the stable text-row identifier this mark is anchored to.
Returns: Int64
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, most-recent-first list; older marks are evicted as new ones arrive.
A mark's row anchor (, ) becomes stale once the terminal's text-row identity space is invalidated (for example by RIS or a resize-driven reflow) — a mark whose no longer matches the terminal's current generation cannot be resolved back to a row.