
```no_run
#[derive(Debug, Clone)]
pub enum Output {
    ToFile(PathBuf),
    ToConsole,
}
pub fn options() -> OptionParser<(usize, Output, bool)> {
    // In most cases you don't keep `NamedArg` around long enough
    // to assign it a name
    let size = short('s')
        .long("size")
        .help("Maximum size to process")
        .argument("SIZE");

    // but it can be useful if you want to have several arguments
    // sharing exact set of names - for example a switch (req_flag)
    // and an argument;
    let output = short('o').long("output");

    let to_file = output
        .clone()
        .help("Save output to file")
        .argument("PATH")
        .map(Output::ToFile);
    let to_console = output
        .help("Print output to console")
        .req_flag(Output::ToConsole);

    // when combining multiple parsers that can conflict with each other
    // it's a good idea to put more general first:
    let output = construct!([to_file, to_console]);

    let verbose = short('v')
        .long("verbose")
        .long("detailed")
        .help("Produce a detailed report")
        .switch();

    construct!(size, output, verbose).to_options()
}

fn main() {
    println!("{:?}", options().run())
}
```


Output

`--help` output will contain first short and first long names that are present and won't have
anything about hidden aliases.

$ app --help

Usage: app -s=SIZE (-o=PATH | -o) [-v]

Available options:

-s, --size=SIZE

Maximum size to process

-o, --output=PATH

Save output to file

-o, --output

Print output to console

-v, --verbose

Produce a detailed report

-h, --help

Prints help information

`--detailed` is a hidden alias and still works despite not being present in `--help` output
above

$ app -o -s 2 --detailed
(2, ToConsole, true)

And hidden means actually hidden. While error message can suggest to fix a typo to make it a
valid _visible_ argument

$ app -o best.txt -s 10 --verbos
Error: no such flag: --verbos, did you mean --verbose?

It will not do so for hidden aliases

$ app -o best.txt -s 10 --detaile
Error: --detaile is not expected in this context

In this example names `-o` and `--output` can be parsed by two parsers - `to_file` and
`to_console`, first one succeeds only if `-o` is followed by a non option name, `best.txt`.

$ app -o best.txt --size 10
(10, ToFile("best.txt"), false)

If such name is not present - parser will try to consume one without, producing `ToConsole`
variant.

$ app -o -s 42
(42, ToConsole, false)

If neither is present - it fails - parser for `output` expects one of its branches to succeed

$ app -s 330
Error: expected --output=PATH or --output, pass --help for usage information

But this can be fixed with [`optional`](Parser::optional) (not included in this example).

