init(name:parsing:help:completion:)

Creates a required property that reads its value from a labeled option.

Option.swift:334
init(name: NameSpecification = .long, parsing parsingStrategy: SingleValueParsingStrategy = .next, help: ArgumentHelp? = nil, completion: CompletionKind? = nil)

Parameters

name

A specification for what names are allowed for this option.

parsingStrategy

The behavior to use when looking for this option’s value.

help

Information about how to use this option.

completion

The type of command-line completion provided for this option.

This initializer is used when you declare an @Option-attributed property that has an ExpressibleByArgument type, but without a default value:

@Option var title: String