Expand description
Terminal prompt with async output support.
Renders directly to the normal terminal buffer (no alternate screen)
so the terminal’s native scrollback is preserved. See README.md
in this crate for the full rendering strategy.
Three rendering paths (see README.md):
- Differential update — common case, diffs visible viewport via
Screen - Scrolling render — on overflow, diffs a suffix rebased at the prior
viewport and renders in order;
\r\nat the bottom pushes content into scrollback without materializing older hidden history - Full render — on resize/invalidation, clears screen + scrollback and replays the capped log/history suffix plus fixed tail without rubber
Structs§
- BlockId
- Opaque numeric identifier for a
StyledBlock. - Candidate
- A single completion candidate surfaced by a
CompletionSource. - Cell
- A terminal cell: one character, its visual style, and display width.
- CellRow
- One normalized, immutable, cheaply shared physical terminal row.
- Completion
Acceptance - A candidate’s whole-buffer replacement and cursor position at acceptance.
- Completion
View - Read-only snapshot of the completion menu state.
- Opaque
Presentation Fact - One caller-owned opaque, content-free fact accepted by raw correlation.
- Output
Snapshot - Snapshot of terminal output zones, excluding prompt input/history state.
- Presentation
Invalidation - Named invalidation mask for opaque predecessor keys.
- Presentation
Observation Key - Validated opaque key used only for caller-owned presentation invalidation.
- Priority
Line - A single line that progressively hides lower-importance styled items.
- Priority
Line Priority - Nonnegative importance assigned to one independently hideable line item.
- Priority
Line Truncation - Display-column bounds for middle truncation of one
PriorityLineitem. - Redraw
Suppression Guard - Owned redraw-suppression scope that may span multiple renderer calls.
- Renderer
Delivery Id - 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.
- Styled
Block - A unit of layout: styled content with background, alignment, and margins.
- Styled
Text - A sequence of styled spans representing rich text.
- Term
- The terminal prompt engine.
- Term
Handle - A cloneable handle for mutating prompt zones from any thread.
- Terminal
Options - Immutable terminal behavior selected before Tau acquires the terminal.
- TwoLine
Elision - Width-adaptive two-row content that preserves leading and trailing excerpts.
Enums§
- Align
- Horizontal alignment within a block.
- Color
- Represents a color.
- Cursor
Shape - Cursor shape requested for the prompt while Tau owns raw mode.
- Event
- High-level events surfaced to the downstream event loop.
- Priority
Line Alignment - Which edge owns an item in a
PriorityLine. - RawEvent
- Raw terminal events from crossterm or a virtual test input channel.
Traits§
- Completion
Source - Builds the candidate list for the current buffer.
Functions§
- 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.