Skip to content

Commit

Permalink
fix(Help Messages): fixes help message alignment when specific settin…
Browse files Browse the repository at this point in the history
…gs are used on options

Prior to this commit setting `number_of_values(1)` and `multiple(true)` would cause the help
message alignment to be off. This commit fixes that.

Closes #760
  • Loading branch information
kbknapp committed Dec 1, 2016
1 parent 8dce248 commit cd94b31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/args/arg_builder/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ impl<'n, 'e> Display for OptBuilder<'n, 'e> {
try!(write!(f, " "));
}
}
if self.is_set(ArgSettings::Multiple) && num == 1 {
try!(write!(f, "..."));
}
} else {
try!(write!(f,
"<{}>{}",
Expand Down

0 comments on commit cd94b31

Please sign in to comment.