Skip to main content

Module completion

Module completion 

Source
Expand description

Command-mode and argument completion content + menu rendering.

State and lifecycle live in tau_cli_term_raw; this module supplies the content (which candidates exist for a given buffer) and the presentation (how the menu block is laid out and styled).

Public types:

Structs§

CommandCompletion
One command-mode completion entry with its display description.
CommandName
One command-mode token, including its leading : (for example, ":model").
CompletionData
Thread-safe storage for dynamic command and argument completions.
CompletionItem
A single argument completion candidate.
CompletionRule
A single prompt completion rule keyed by the word prefix that activates it.
CompletionRules
Prompt completion rules. If multiple rules match, the longest prefix wins.

Enums§

CompletionRuleKind
Named completion behavior selected by prompt completion config.

Functions§

build_candidates
Builds the candidate list for the given buffer/cursor.
build_candidates_with_rules
Builds candidates using explicit prompt completion rules.
render_menu_block
Renders the completion menu as a StyledBlock: each candidate on its own line, with the selected entry highlighted.

Type Aliases§

ArgCompleter
Closure that produces argument completions for a command, given the already-typed args (the last element is the partial arg being completed; may be empty for “just typed a space”).