ShellCommandRegistry class

Registry of manifest-selected shell commands and their live variables.

A manifest never evaluates Dart identifiers. Instead, each handler must name a handler provided to this registry's constructor.

Constructors

ShellCommandRegistry({required Map<String, ShellCommandHandler> handlers, Map<String, ShellArgumentParser> argumentParsers = const {}})
Creates a registry from the set of Dart handlers allowed by manifests.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

execute(String input) → ShellCommandResult
Evaluates an input line, including built-in help, load, and let commands.
help() → List<Map<String, Object?>>
Lists the commands exposed by currently loaded manifests.
loadFile(String path) → List<String>
Loads command bindings from a JSON or YAML manifest at path.
loadManifestText(String source) → List<String>
Loads command bindings from a JSON or YAML source.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerArgumentParser(String type, ShellArgumentParser parser) → void
Registers a parser for a manifest argument type such as SignalOccurrence or HierarchyOccurrence.
registerHandler(String name, ShellCommandHandler handler) → void
Registers a Dart handler that a subsequent manifest may reference.
setVariable(String name, Object? value) → void
Adds or replaces a variable while retaining its live object identity.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited