Static Propertyswift-argument-parser 1.6.1ArgumentParser
prefixedNo
Adds a matching flag with a no-
prefix to represent false
.
static var prefixedNo: FlagInversion { get }
For example, the shouldRender
property in this declaration is set to true
when a user provides --render
and to false
when the user provides --no-render
:
@Flag(name: .customLong("render"), inversion: .prefixedNo)
var shouldRender: Bool