mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 23:04:23 +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" => {
|
||||
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 {
|
||||
self.parser.app.before_help
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue