mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 06:12:40 +00:00
fix(error): Include 'Usage:' title in --flag=bad-value error
This commit is contained in:
parent
3a8d2a579b
commit
12d76d649a
2 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,7 @@ impl<'cmd> Parser<'cmd> {
|
|||
self.cmd,
|
||||
rest,
|
||||
arg,
|
||||
Usage::new(self.cmd).create_usage_no_title(&used),
|
||||
Usage::new(self.cmd).create_usage_with_title(&used),
|
||||
));
|
||||
}
|
||||
ParseResult::MaybeHyphenValue => {
|
||||
|
|
|
@ -142,7 +142,7 @@ fn unexpected_value_error() {
|
|||
const USE_FLAG_AS_ARGUMENT: &str = "\
|
||||
error: The value 'foo' was provided to '--a-flag' but it wasn't expecting any more values
|
||||
|
||||
mycat [OPTIONS] [filename]
|
||||
Usage: mycat [OPTIONS] [filename]
|
||||
|
||||
For more information try '--help'
|
||||
";
|
||||
|
|
Loading…
Reference in a new issue