SidekickCommandRunner<T> class
A CommandRunner that makes lookups in SidekickContext faster
- Inheritance
-
- Object
- CommandRunner<
T> - SidekickCommandRunner
Properties
- argParser → ArgParser
-
The top-level argument parser.
no setterinherited
-
commands
→ Map<
String, Command< T> > -
An unmodifiable view of all top-level commands defined for this runner.
no setterinherited
- completionInstallation → CompletionInstallation
-
The
CompletionInstallation
used to install completion files.no setterinherited - completionInstallationLogger → Logger
-
The
Logger
used to display messages during completion installation.finalinherited - completionLogger → Logger
-
The
Logger
used to prompt the completion suggestions.finalinherited - dartSdk → Directory?
-
final
- description → String
-
A short description of this executable.
finalinherited
- enableAutoInstall → bool
-
Define whether the installation of the completion files should done
automatically upon the first command run.
no setter
-
environmentOverride
↔ Map<
String, String> ? -
Environment map which can be overridden for testing purposes.
getter/setter pairinherited
- executableName → String
-
The name of the executable being run.
finalinherited
- flutterSdk → Directory?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- invocation → String
-
A single-line template for how to invoke this executable.
no setterinherited
- mainProject → DartPackage?
-
final
- repository → Repository
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- suggestionDistanceLimit → int
-
The maximum edit distance allowed when suggesting possible intended
commands.
finalinherited
- systemShell → SystemShell?
-
The
SystemShell
used to determine the current shell.no setterinherited - usage → String
-
Generates a string displaying usage information for the executable.
no setterinherited
-
An optional footer for usage.
no setterinherited
Methods
-
addCommand(
Command< T> command) → void -
Adds Command as a top-level command to this runner.
inherited
-
mount(
{String? debugName}) → Unmount - Mounts the sidekick related globals, returns a function to unmount them and restore the previous globals
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
Iterable< String> args) → ArgResults -
Parses
args
and returns the result, converting an ArgParserException to a UsageException.inherited -
printUsage(
) → void -
Prints the usage information for this runner.
inherited
-
renderCompletionResult(
CompletionResult completionResult) → void -
Renders a
CompletionResult
into the current system shell.inherited -
run(
Iterable< String> args) → Future<T?> -
Parses
args
and invokes Command.run on the chosen command.override -
runCommand(
ArgResults topLevelResults) → Future< T?> -
Runs the command specified by
topLevelResults
.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
tryInstallCompletionFiles(
Level level) → void -
Tries to install completion files for the current shell.
inherited
-
usageException(
String message) → Never -
Throws a UsageException with
message
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited