mirror of
https://github.com/clap-rs/clap
synced 2024-11-11 15:17:10 +00:00
feat(app): Introspect current help heading
This will help for #2803 so we can capture and restore the help heading around flattened derives.
This commit is contained in:
parent
a570976d92
commit
5bbcc0f4ba
1 changed files with 8 additions and 0 deletions
|
@ -146,6 +146,14 @@ impl<'help> App<'help> {
|
|||
self.long_about
|
||||
}
|
||||
|
||||
/// Get the custom section heading specified via [`App::help_heading`].
|
||||
///
|
||||
/// [`App::help_heading`]: App::help_heading()
|
||||
#[inline]
|
||||
pub fn get_help_heading(&self) -> Option<&'help str> {
|
||||
self.current_help_heading
|
||||
}
|
||||
|
||||
/// Iterate through the *visible* aliases for this subcommand.
|
||||
#[inline]
|
||||
pub fn get_visible_aliases(&self) -> impl Iterator<Item = &str> {
|
||||
|
|
Loading…
Reference in a new issue