Skip to content

Initializer

init(name:help:completion:)

Creates a new Argument
init(name: String, help: String = "", completion: CompletionAction = .default)

Parameters

name

The argument’s identifying name.

help

The arguments’s help text when --help is passed in.

completion

The argument’s shell completion action. See CompletionAction for more information and available actions.

Discussion

@Argument(name: "count", help: "The number of times to run the command")
var count: Int