mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
fix(Help Message): fixes a regression bug where args with multiple(true) threw off alignment
Closes #702
This commit is contained in:
parent
cf26cd83aa
commit
ebddac791f
1 changed files with 6 additions and 0 deletions
|
@ -307,8 +307,14 @@ impl<'a> Help<'a> {
|
||||||
try!(write!(self.writer, " "));
|
try!(write!(self.writer, " "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if arg.is_set(ArgSettings::Multiple) && num == 1 {
|
||||||
|
try!(color!(self, "...", good));
|
||||||
|
}
|
||||||
} else if arg.has_switch() {
|
} else if arg.has_switch() {
|
||||||
try!(color!(self, "<{}>", arg.name(), good));
|
try!(color!(self, "<{}>", arg.name(), good));
|
||||||
|
if arg.is_set(ArgSettings::Multiple) {
|
||||||
|
try!(color!(self, "...", good));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
try!(color!(self, "{}", arg, good));
|
try!(color!(self, "{}", arg, good));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue