directory
The completion candidates are directory names.
static var directory: CompletionKind { get }
The directory filter is included in a completion script when it is generated.
The completion candidates are directory names.
static var directory: CompletionKind { get }
The directory filter is included in a completion script when it is generated.
import ArgumentParser
Straightforward, type-safe argument parsing for Swift.
struct CompletionKind
The type of completion to use for an argument or option value.
static var `default`: CompletionKind { get }
Use the default completion kind for the argument’s or option value’s type.
static func custom(_ completion: @escaping ([String], Int, String) async -> [String]) -> CompletionKind
Generate completions using the given async closure.
@preconcurrency static func custom(_ completion: @escaping ([String], Int, String) -> [String]) -> CompletionKind
The completion candidates are the strings in the array returned by the given closure when it is executed in response to a user’s request for completions.
static func file(extensions: [String] = []) -> CompletionKind
The completion candidates include directory and file names, the latter filtered by the given list of extensions.
static func list(_ words: [String]) -> CompletionKind
The completion candidates are the strings in the given array.
static func shellCommand(_ command: String) -> CompletionKind
The completion candidates are specified by the stdout
output of the given string run as a shell command when a user requests completions.
@preconcurrency static func custom(_ completion: @escaping ([String]) -> [String]) -> CompletionKind
Deprecated; only kept for backwards compatibility.