diff --git a/clap_generate/src/generators/shells/zsh.rs b/clap_generate/src/generators/shells/zsh.rs index dbb9203b8a35..730f660ac28c 100644 --- a/clap_generate/src/generators/shells/zsh.rs +++ b/clap_generate/src/generators/shells/zsh.rs @@ -520,7 +520,7 @@ fn write_positionals_of(p: &App) -> String { for arg in p.get_positionals() { debug!("write_positionals_of:iter: arg={}", arg.get_name()); - let optional = if arg.is_set(ArgSettings::MultipleValues) { + let cardinality = if arg.is_set(ArgSettings::MultipleValues) { "*:" } else if !arg.is_set(ArgSettings::Required) { ":" @@ -529,8 +529,8 @@ fn write_positionals_of(p: &App) -> String { }; let a = format!( - "'{optional}:{name}{help}:{value_completion}' \\", - optional = optional, + "'{cardinality}:{name}{help}:{value_completion}' \\", + cardinality = cardinality, name = arg.get_name(), help = arg .get_about()