parseAsRoot(_:)
Parses an instance of this type, or one of its subcommands, from command-line arguments.
static func parseAsRoot(_ arguments: [String]? = nil) throws -> any ParsableCommand
Parameters
- arguments
An array of arguments to use for parsing. If
arguments
isnil
, this uses the program’s command-line arguments.
Returns
A new instance of this type, one of its subcommands, or a command type internal to the ArgumentParser
library.
Throws
If parsing fails.