Skip to main content

Module flags

Module flags 

Source
Expand description

Clap flatten structs for shared flags. Shared clap flatten structs.

Structs§

ColorLong
--color without -c, for CLIs that already use -c for config.
DryRunArgs
-n/--dry-run with --preview as the visible alias.
FlagWarning
One warning. Display is the stderr line after {bin}: warning: .
FormatArgs
-f/--format and -q/--quiet without -c.
FormatLong
--format and -q/--quiet without -f, for CLIs that already use -f for a domain flag such as --file.
OutputArgs
Global pretty/JSON output, color, quiet. Flatten onto the root parser.

Enums§

WarningKind
How two (or more) flags fight.

Traits§

EnvPrefix
Binds each long option of a Command and of every subcommand to <PREFIX>_<LONG>, so the environment can set any flag a CLI declares.

Functions§

chassis_warnings
Chassis flags known to ctl-core.
emit_warnings
Print {bin}: warning: … for each finding.
env_under_flags
Removes each variable that the command line overrules, so the command line wins, and refuses two variables that conflict.
resolve_color
--no-color wins over a --color value.
switch
Last-wins boolean after clap overrides_with. on is the yes flag.
warn_opposites
--foo / --no-foo both present.