Skip to main content

Crate tau_cli_term

Crate tau_cli_term 

Source
Expand description

Higher-level terminal prompt with command completion.

This crate is now a thin shell around tau_cli_term_raw: the raw layer owns the input state machine (history navigation, completion menu lifecycle, key dispatch). This crate plugs in the content (which candidates exist for a given buffer) and the presentation (how the menu is rendered as a styled block under the prompt). It also handles $EDITOR integration, which doesn’t belong in the raw layer. The ownership split and subprocess/editor contracts are summarized in ARCH-tau-cli-term.

Re-exports§

pub use completion::ArgCompleter;
pub use completion::CommandCompletion;
pub use completion::CommandName;
pub use completion::CompletionData;
pub use completion::CompletionItem;
pub use completion::CompletionRule;
pub use completion::CompletionRules;

Modules§

completion
Command-mode and argument completion content + menu rendering.
resolve
Bridge between tau_themes and tau_cli_term_raw types.

Structs§

BlockId
Opaque numeric identifier for a StyledBlock.
Cell
A terminal cell: one character, its visual style, and display width.
EditorContext
Conversation context and prompt-editor recovery state appended below the prompt trailer when the user edits the prompt in an external editor.
ForegroundRestorationDiagnostic
Bounded private diagnostic for one terminal foreground-restoration failure.
HighTerm
Higher-level terminal prompt with completion support.
OpaquePresentationFact
One caller-owned opaque, content-free fact accepted by raw correlation.
OutputSnapshot
Snapshot of terminal output zones, excluding prompt input/history state.
PresentationInvalidation
Named invalidation mask for opaque predecessor keys.
PresentationObservationKey
Validated opaque key used only for caller-owned presentation invalidation.
PriorityLine
A single line that progressively hides lower-importance styled items.
PriorityLinePriority
Nonnegative importance assigned to one independently hideable line item.
PriorityLineTruncation
Display-column bounds for middle truncation of one PriorityLine item.
RedrawSuppressionGuard
Owned redraw-suppression scope that may span multiple renderer calls.
RendererDeliveryId
Identifies one socket delivery as it crosses the CLI renderer pipeline.
Span
A run of text with a uniform style.
Style
Visual attributes for a single character cell.
StyledBlock
A unit of layout: styled content with background, alignment, and margins.
StyledText
A sequence of styled spans representing rich text.
TermHandle
A cloneable handle for mutating prompt zones from any thread.
TerminalOptions
Immutable terminal behavior selected before Tau acquires the terminal.
TwoLineElision
Width-adaptive two-row content that preserves leading and trailing excerpts.

Enums§

Align
Horizontal alignment within a block.
Color
Represents a color.
CursorShape
Cursor shape requested for the prompt while Tau owns raw mode.
Event
High-level events surfaced to the caller.
ExternalProgramError
Failure while an interactive external program temporarily owns the terminal.
PriorityLineAlignment
Which edge owns an item in a PriorityLine.

Functions§

canonical_literal_colon_prompt
Returns canonical literal-colon prompt text for a line beginning with ::.
foreground_restoration_diagnostic
Returns the bounded restoration diagnostic from an input I/O fail-stop.
is_foreground_ownership_unconfirmed
Returns whether an input I/O error requires attachment-only terminal fail-stop.
is_output_failure
Returns whether an I/O error reports fail-stop of this terminal attachment.
sanitize_hyperlink_target
Rejects targets that could terminate OSC 8 or inject terminal controls.