cli icon indicating copy to clipboard operation
cli copied to clipboard

Mutually exclusive flags in help output

Open Olimpian opened this issue 2 months ago • 0 comments

What problem does this solve?

  • needing to have the opportunity to change FlagStringer for mutually exclusive flags

Solution description

For example, we have mutually exclusive flags m1 & m2, they are required. The fact that one of them (m1 or m2) is required must be displayed to the user. With simple flags we can override cli.FlagStringer func for our custom, where can add some special information if flag is required. But with MutuallyExclusiveFlags it doesn't work. Maybe add some func to override here too? So we can add some inside logic for output this groups of flags

Olimpian avatar Nov 05 '25 17:11 Olimpian