Structure
AsyncCommands
Represents a top-level group of configured commands. This is usually created by calling
resolve(for:) on AsyncCommands.struct AsyncCommands
Topics
Initializers
init(commands: [String : any AnyAsyncCommand], defaultCommand: (any AnyAsyncCommand)?, enableAutocomplete: Bool)Creates a newConfiguredCommandsstruct. This is usually done by callingresolve(for:)onAsyncCommands.
Instance Properties
var commands: [String : any AnyAsyncCommand]Top-level available commands, stored by unique name.var defaultCommand: (any AnyAsyncCommand)?If set, this is the default top-level command that should run if no other commands are specified.var enableAutocomplete: BoolIftrue, anautocompletesubcommand will be added to any createdAsyncCommandGroup.
Instance Methods
func group(help: String) -> any AsyncCommandGroupCreates anAsyncCommandGroupfor thisAsyncCommands.func use(any AnyAsyncCommand, as: String, isDefault: Bool)Adds anAsyncCommandinstance to the config.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype