CompletionShell enum

The shells and completion frameworks for which completion scripts can be generated.

Inheritance
Available extensions

Values

bash → const CompletionShell
const CompletionShell('Bash')
zsh → const CompletionShell
const CompletionShell('Zsh')
fish → const CompletionShell
const CompletionShell('Fish')
powershell → const CompletionShell
const CompletionShell('PowerShell')
carapace → const CompletionShell
const CompletionShell('Carapace')

Properties

activationInstruction → String
How to make a newly installed completion take effect in the current shell session, e.g. by reloading the shell.
no setter
displayName → String
The display name.
final
hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
installLocation → String?
The shell startup file to add installCommand to, or null if the command is run once instead.
no setter
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

installCommand(String executableName, {bool viaOption = false, String? commandName}) → String
The command that installs the completion script for this shell, e.g. source <(mycli completion --shell bash).
installInstruction(String executableName, {bool viaOption = false, String? commandName}) → String
One-line installation instruction for this shell: the installCommand, followed by the installLocation as a comment.
installInstructions(String executableName, {bool viaOption = false, String? commandName}) → String
Longer installation instructions for this shell, including alternative ways to install the script where available, and how to activate the installed completion (activationInstruction).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
script(String executableName, {String? description, bool viaOption = false, String? commandName}) → String
Generates the completion script (or spec) for executableName.
scriptCommand(String executableName, {bool viaOption = false, String? commandName}) → String
The command line that prints the completion script for this shell: <exe> completion --shell <shell>, or <exe> --completion <shell> if viaOption. With a commandName, the completion command's --command <name> option is added.
scriptHeader(String executableName, {bool viaOption = false, String? commandName}) → String
The comment lines for the header of the generated script: what generated it, how to install it (installInstructions) and why it needs to be installed only once.
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<CompletionShell>
A constant List of the values in this enum, in order of their declaration.