NameSpecification
A specification for how to represent a property as a command-line argument label.
struct NameSpecification
A specification for how to represent a property as a command-line argument label.
struct NameSpecification
import ArgumentParser
Straightforward, type-safe argument parsing for Swift.
Support your users (and yourself) by providing rich help for arguments, options, and flags.
struct ArgumentHelp
Help information for a command-line argument.
struct ArgumentVisibility
Visibility level of an argument’s help.
protocol ExpressibleByArrayLiteral
A type that can be initialized using an array literal.
protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
init<S>(_ sequence: S) where S : Sequence, S.Element == NameSpecification.Element
init(arrayLiteral elements: Element...)
static var long: NameSpecification { get }
Use the property’s name converted to lowercase with words separated by hyphens.
static var short: NameSpecification { get }
Use the first character of the property’s name as a short option label.
static var shortAndLong: NameSpecification { get }
Combine the .short
and .long
specifications to allow both long and short labels.
static func customLong(_ name: String, withSingleDash: Bool = false) -> NameSpecification
Use the given string instead of the property’s name.
static func customShort(_ char: Character, allowingJoined: Bool = false) -> NameSpecification
Use the given character as a short option label.
struct Element
An individual property name translation.