Skip to content

Commit

Permalink
Rename optional -> cardinality
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed Jul 20, 2020
1 parent c843a95 commit 3827ac0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clap_generate/src/generators/shells/zsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
":"
Expand All @@ -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()
Expand Down

0 comments on commit 3827ac0

Please sign in to comment.