Initializerswift-argument-parser 1.6.1ArgumentParser
init(arrayLiteral:)
NameSpecification.swift:88init(arrayLiteral elements: NameSpecification.Element...)
init(arrayLiteral elements: NameSpecification.Element...)
s14ArgumentParser17NameSpecificationV12arrayLiteralA2C7ElementVd_tcfc
What are these?1UF5Z
import ArgumentParser
Straightforward, type-safe argument parsing for Swift.
struct NameSpecification
A specification for how to represent a property as a command-line argument label.
struct Element
An individual property name translation.
init<S>(_ sequence: S) where S : Sequence, S.Element == NameSpecification.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.