From 3827ac005e8d3e9b5b9df6e7f494b8017591a7f4 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sun, 19 Jul 2020 02:05:41 +0300 Subject: [PATCH] Rename optional -> cardinality --- clap_generate/src/generators/shells/zsh.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()