Skip to main content

Module base

Module base 

Source
Expand description

Native Rust implementations of Base/ completion functions

This module implements all the core functions from zsh’s Base/ directory:

  • Core: _main_complete, _tags, _normal, _dispatch, etc.
  • Utility: _alternative, _values, _multi_parts, etc.
  • Completer: _complete, _approximate, _correct, etc.

Structs§

Alternative
Alternative specification
CompletionContext
Completion context for tag-based completion
MainCompleteState
State for _main_complete
TagManager
Tag set management for completion
Value
Value with optional argument for _values

Enums§

CompleterResult
Result from a completer function

Functions§

all_labels
_all_labels - iterate over all labels for a tag
alternative
_alternative - try multiple completion alternatives
completer_approximate
_approximate - approximate completion (fuzzy matching)
completer_complete
_complete - the main completer
completer_correct
_correct - spelling correction
completer_expand
_expand - expansion of special characters
completer_history
_history - complete from history
completer_ignored
_ignored - complete with ignored matches
completer_match
_match - pattern matching completion
completer_menu
_menu - menu completion
completer_prefix
_prefix - complete with prefix handling
description
_description - set up description for a tag Handles styles: format, hidden, group-name, matcher, sort, ignored-patterns
dispatch_complete
_dispatch - dispatch to appropriate completion function
get_ignored_patterns
Get ignored-patterns for a context/tag
is_ignored
Check if a string matches any ignored pattern
main_complete
Main completion entry point (_main_complete)
message
_message - display a message (no completions)
multi_parts
_multi_parts - complete with path-like parts
next_label
_next_label - get next label for a tag (for iteration)
normal_complete
_normal - normal command completion
requested
_requested - check if a tag is currently being tried
sep_parts
_sep_parts - complete parts with arbitrary separators
values_complete
_values - complete comma-separated values
wanted
_wanted - check if a tag is wanted (without marking as requested)

Type Aliases§

CompleterFn
Completer function type