clap-rs / clap

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

Allow using a completion-specific candidate description over the candidate's help message in rust-native completions #5063

Open ModProg opened 1 year ago

ModProg commented 1 year ago

Some shell completions, such as fish and zsh allow displaying a help message.

Currently, we use the short help, but this might not always be appropriate due to the constraints of the completion.

We could consider adding a separate complete_help to any command, argument, or possible value, this would be the first line of the short help by default, but could be overridden either to disable, or to replace with a custom message.

This does pose some complexity as it adds an additional field to everything with a help or about.

epage commented 1 year ago

complete_help would be blocked on the plugin system being publicly exposed

epage commented 2 weeks ago

btw we now have unstable support for the plugin system, unblocking this.