Class
Option
A supported option for a command.
@propertyWrapper final class Option<Value> where Value : LosslessStringConvertible, Value : Sendable
Overview
exec command [--opt -o]
Topics
Initializers
init(name: String, short: Character?, help: String, completion: CompletionAction)Creates a newOptionwith theoptionTypeset to.value.
Instance Properties
let completion: CompletionActionThe option’s shell completion action.let help: StringThe option’s short flag.var initialized: Boolvar isPresent: BoolWhether the option was passed into the command’s signature or not.let name: StringThe option’s identifying name.var projectedValue: Option<Value>let short: Character?The option’s help text when--helpis passed in.var wrappedValue: Value?
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype