Skip to content

Unclear help with sets of 3 or more mutually exclusive flags #50

@glessard

Description

@glessard

I defined a set of mutually exclusive flags thusly:

enum OutputBehaviour: String, CaseIterable { case stats, count, list }

struct Options: ParsableCommand {
  @Flag(help: "Program output")
  var behaviour: OutputBehaviour
}

let options = Options.parseOrExit()

The help message that corresponds to these is not very helpful:

$ ./options --help
USAGE: options --stats --count --list

OPTIONS:
  --stats/--count         Program output 
  --list                  Program output 
  -h, --help              Show help information.

The help generator lists them in pairs whenever there are more than 2.
It's not clear that the three flags (stats, count, list) are a set.
It's not clear that they are mutually exclusive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions