Skip to main content

Module model

Module model 

Source
Expand description

Shared completion data structures passed between the parser and suggester. Data structures shared across completion parsing, analysis, and ranking.

This module exists to give the completion engine a stable vocabulary for cursor state, command-line structure, command-tree metadata, and ranked suggestions. The parser and suggester can evolve independently as long as they keep exchanging these values.

Contract:

  • types here should stay pure data and small helpers
  • this layer may depend on shell tokenization details, but not on terminal painting or REPL host state
  • public builders should describe the stable completion contract, not internal parser quirks

Re-exports§

pub use crate::core::shell_words::QuoteStyle;

Structs§

ArgNode
Positional argument definition for one command slot.
CommandLine
Parsed command-line structure before higher-level completion analysis.
CompletionAnalysis
Full completion analysis derived from parsing and context resolution.
CompletionContext
Resolved completion state for the cursor position.
CompletionNode
One node in the immutable completion tree.
CompletionTree
Immutable completion data consumed by the engine.
CursorState
Replacement details for the token currently being completed.
FlagHints
Flag-name hints shared globally and overridden by provider.
FlagNode
Completion metadata for a flag spelling.
FlagOccurrence
One occurrence of a flag and the values consumed with it.
OsVersions
OS version suggestions shared globally or scoped by provider.
ParsedLine
Parser output for the full line and the cursor-local prefix.
RequestHintSet
Request hints shared globally and overridden by provider.
RequestHints
Request-form hints used to derive flag and value suggestions.
Suggestion
Ranked suggestion ready for formatting or rendering.
SuggestionEntry
Suggestion payload shown to the user and inserted on accept.

Enums§

CompletionRequest
Explicit request kind for the current cursor position.
ContextScope
Scope used when merging context-only flags into the cursor view.
MatchKind
High-level classification for a completion candidate.
SuggestionOutput
Output emitted by the suggestion engine.
TailItem
Item in the parsed tail after the command path.
ValueType
Semantic type for values completed by the engine.