customShort(_:allowingJoined:)

Use the given character as a short option label.

NameSpecification.swift:75
static func customShort(_ char: Character, allowingJoined: Bool = false) -> NameSpecification.Element

Parameters

char

The name of the option or flag.

allowingJoined

A Boolean value indicating whether this short name allows a joined value.

Returns

A short name specification with the requested char.

When passing true as allowingJoined in an @Option declaration, the user can join a value with the option name. For example, if an option is declared as -D, allowing joined values, a user could pass -Ddebug to specify debug as the value for that option.