Initializer
init(commands:defaultCommand:enableAutocomplete:)
Creates a new
ConfiguredCommands struct. This is usually done by calling resolve(for:) on AsyncCommands.init(commands: [String : any AnyAsyncCommand] = [:], defaultCommand: (any AnyAsyncCommand)? = nil, enableAutocomplete: Bool = false)
Parameters
commandsTop-level available commands, stored by unique name.
defaultCommandIf set, this is the default top-level command that should run if no other commands are specified.
enableAutocompleteIf
true, anautocompletesubcommand will be added to any createdAsyncCommandGroup.The
autocompletecommand generates shell completion scripts that can be loaded from shell configuration files to provide autocompletion for the entire command hierarchy and its command-line arguments.enableAutocompleteshould only be set totruefor a root command group. Any nested subcommands will automatically be included in the completion script generation process.