Skip to main content

Module completion

Module completion 

Source
Expand description

Tab completion: context parsing (command vs path), command and path candidates. Rustyline Helper (Completer, Hinter, Highlighter, Validator) for command and path completion.

Structs§

CompletionContext
从 (line, pos) 解析出的补全上下文:当前词的前缀,以及是命令还是路径
DevShellHelper
Helper for rustyline: command and path tab-completion using shared Vfs and SessionHolder.
NoHint
Dummy hint type for Hinter; we never return a hint (hint() returns None).

Enums§

CompletionKind
当前输入位置是命令名、路径,或不需要补全(用于选择补全源)

Functions§

complete_commands
Command completion: case-insensitive prefix match. Returns matching command names.
complete_path
Path completion: prefix may contain slashes; only the basename segment is matched.
completion_context
Parse completion context at (line, pos). Returns None if line empty or pos out of bounds.
list_dir_names_for_completion
List directory entry names for path tab completion: Mode P (γ or β) uses GuestFsOps when guest-primary is active; otherwise Vfs::list_dir.