-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
area/flags-argsChanges to functionality around command line flags and argsChanges to functionality around command line flags and args
Description
Hi!
I want to ask, if there is an option to mark one of n of the mutually exclusive flags required? This means there must appear exactly one of the n flags, otherwise an error should be printed.
For example:
# this should print contents from file:
$ echo -f ./file.txt
hello world
# this should act as a regular echo:
$ echo -i "hello world"
hello world
# this should print help and info about missing required flags:
$ echo
Error: one of mutually exclusive required flag(s) not set: "f", "i"
Usage:
echo [flags]Metadata
Metadata
Assignees
Labels
area/flags-argsChanges to functionality around command line flags and argsChanges to functionality around command line flags and args