diff --git a/clap_complete/examples/completion-derive.rs b/clap_complete/examples/completion-derive.rs index 72f8fd89..baf142fb 100644 --- a/clap_complete/examples/completion-derive.rs +++ b/clap_complete/examples/completion-derive.rs @@ -30,6 +30,7 @@ struct Opt { #[derive(Subcommand, Debug, PartialEq)] enum Commands { + #[clap(visible_alias = "hint")] ValueHint(ValueHintOpt), } diff --git a/clap_complete/examples/completion.rs b/clap_complete/examples/completion.rs index cf2299c4..0455d4f9 100644 --- a/clap_complete/examples/completion.rs +++ b/clap_complete/examples/completion.rs @@ -18,6 +18,7 @@ use std::io; fn build_cli() -> Command { let value_hint_command = Command::new("value-hint") + .visible_alias("hint") .arg( Arg::new("unknown") .long("unknown")