ToPowerShellCompletionConverter class final
Compiles a registry record into a native PowerShell argument completer.
The generated script registers a single Register-ArgumentCompleter -Native
handler and resolves every element strictly left of the cursor against
one of three small PowerShell maps emitted from the registry:
- Spelled-name table (
$script:MambaSpellingFor) mapping every visible spelling (long, short, negated, accessor) to its canonical owning command. - Per-command tables (split into command-specific helper functions) for commands, choice options, repeated positionals, and variadics.
- Lookup tables to identify when a long/short spelling must consult a value handler before emitting flag candidates.
All candidate CompletionResult objects flow out individually through the
success pipeline so PowerShell presents them as separate entries.
The emitted syntax targets Windows PowerShell 5.1 and PowerShell 7 or newer.
- Inheritance
-
- Object
- RegistryRecordConverter
- ToPowerShellCompletionConverter
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- registry → RegistryRecord
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
convert(
) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited