Skip to content

Commit

Permalink
feat(app): Introspect current help heading
Browse files Browse the repository at this point in the history
This will help for clap-rs#2803 so we can capture and restore the help heading
around flattened derives.
  • Loading branch information
epage committed Oct 14, 2021
1 parent a570976 commit 5bbcc0f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/build/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 5bbcc0f

Please sign in to comment.