Package
ConsoleKitCommands
ConsoleKitCommands provides utilities for handing commandline arguments in a Swift application. It provides Command and AsyncCommand types, as well as other supporting types, for processing commands with arguments, options, and flags.Overview
Note
At this time, the argument handling capabilities of ConsoleKit are considered obsolete; when possible, we strongly recommend using ArgumentParser instead.
Topics
Classes
class ArgumentAn argument for a console commandclass FlagA supported option for a command.class OptionA supported option for a command.
Protocols
protocol AnyAsyncCommandA type-erasedCommand.protocol AnyCommandA type-erasedCommand.protocol AsyncCommandA command that can be run through aConsole.protocol AsyncCommandGroupA group of named commands that can be run through aConsole.protocol CommandA command that can be run through aConsole.protocol CommandGroupA group of named commands that can be run through aConsole.protocol CommandSignatureThe structure of the inputs that a command can take
Structures
struct AsyncCommandsRepresents a top-level group of configured commands. This is usually created by callingresolve(for:)onAsyncCommands.struct CommandContextA type-erasedCommandContextstruct CommandInputRaw input for commands. Use this to parse options and arguments for the command context.struct CommandsRepresents a top-level group of configured commands. This is usually created by callingresolve(for:)onCommands.struct CompletionActionAn action to be used in the shell completion script(s) to provide special shell completion behaviors for anOption’s argument or a positionalArgument.struct ConsoleErrorstruct MergedAsyncCommandGroup
Enumerations
enum CommandErrorErrors working with theConsoleKitCommandsmodule.enum ShellShell completion implementations.