clap-rs / clap

A full featured, fast Command Line Argument Parser for Rust
docs.rs/clap
Apache License 2.0
14.14k stars 1.03k forks source link

`#[arg(value_delimiter = ':')]` Delimiter isnt displayed in the help message. #5392

Open max-ishere opened 6 months ago

max-ishere commented 6 months ago

Please complete the following tasks

Clap Version

4.5.2

Describe your use case

Most of the arguments are already documented by clap, I didnt even have to do anything (nice). However the delimiter doesnt show up in the help message.

    /// Colon-separated list of lock types
    #[arg(required = true, value_delimiter = ':')]
    #[clap(long)]
    what: Vec<InhibitTarget>,
Options:
      --what <WHAT>  Colon-separated list of lock types [possible values: shutdown, sleep, ...]

Describe the solution you'd like

The delimiter should be shown like this:

Options:
      --what <WHAT>  [`:` separated list of: shutdown, sleep, ...]

Alternatives, if applicable

No response

Additional Context

No response

epage commented 6 months ago

For #4812, we are looking at including it within the example usage. I'd be interested in exploring ways of doing that here as well.