diff --git a/src/app/help.rs b/src/app/help.rs index dab618e9..074dfc87 100644 --- a/src/app/help.rs +++ b/src/app/help.rs @@ -283,7 +283,13 @@ impl<'a> Help<'a> { } try!(color!(self, "--{}", l, good)) } - try!(write!(self.writer, " ")); + + let sep = if arg.is_set(ArgSettings::RequireEquals) { + "=" + } else { + " " + }; + try!(write!(self.writer, "{}", sep)); } else if let Some(l) = arg.long() { if arg.short().is_some() { try!(write!(self.writer, ", ")); diff --git a/src/args/arg_builder/option.rs b/src/args/arg_builder/option.rs index 91c2ee6f..342ccbdc 100644 --- a/src/args/arg_builder/option.rs +++ b/src/args/arg_builder/option.rs @@ -50,11 +50,16 @@ impl<'n, 'e> From> for OptBuilder<'n, 'e> { impl<'n, 'e> Display for OptBuilder<'n, 'e> { fn fmt(&self, f: &mut Formatter) -> Result { debugln!("OptBuilder::fmt"); + let sep = if self.b.is_set(ArgSettings::RequireEquals) { + "=" + } else { + " " + }; // Write the name such --long or -l if let Some(l) = self.s.long { - try!(write!(f, "--{} ", l)); + try!(write!(f, "--{}{}", l, sep)); } else { - try!(write!(f, "-{} ", self.s.short.unwrap())); + try!(write!(f, "-{}{}", self.s.short.unwrap(), sep)); } // Write the values such as