mirror of
https://github.com/clap-rs/clap
synced 2025-01-21 00:53:52 +00:00
Fix: {before-help} should have fallback just like {after-help}.
This commit is contained in:
parent
2c91800099
commit
4545a47ff6
1 changed files with 4 additions and 1 deletions
|
@ -1058,7 +1058,10 @@ impl<'help, 'app, 'parser, 'writer> Help<'help, 'app, 'parser, 'writer> {
|
||||||
}
|
}
|
||||||
b"before-help" => {
|
b"before-help" => {
|
||||||
let before_help = if self.use_long {
|
let before_help = if self.use_long {
|
||||||
self.parser.app.before_long_help
|
self.parser
|
||||||
|
.app
|
||||||
|
.before_long_help
|
||||||
|
.or(self.parser.app.before_help)
|
||||||
} else {
|
} else {
|
||||||
self.parser.app.before_help
|
self.parser.app.before_help
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue