Skip to content

Commit

Permalink
docs(App::template): adds details about the necessity to use AppSetti…
Browse files Browse the repository at this point in the history
…ngs::UnifiedHelpMessage when using {unified} tags in the help template

Closes #949
  • Loading branch information
kbknapp committed May 16, 2017
1 parent f9b0d65 commit cbea3d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ impl<'a, 'b> App<'a, 'b> {
/// * `{usage}` - Automatically generated or given usage string.
/// * `{all-args}` - Help for all arguments (options, flags, positionals arguments,
/// and subcommands) including titles.
/// * `{unified}` - Unified help for options and flags.
/// * `{unified}` - Unified help for options and flags. Note, you must *also* set
/// [`AppSettings::UnifiedHelpMessage`] to fully merge both options and
/// flags, otherwise the ordering is "best effort"
/// * `{flags}` - Help for flags.
/// * `{options}` - Help for options.
/// * `{positionals}` - Help for positionals arguments.
Expand All @@ -559,6 +561,7 @@ impl<'a, 'b> App<'a, 'b> {
/// [`App::about`]: ./struct.App.html#method.about
/// [`App::after_help`]: ./struct.App.html#method.after_help
/// [`App::before_help`]: ./struct.App.html#method.before_help
/// [`AppSettings::UnifiedHelpMessage`]: ./enum.AppSettings.html#variant.UnifiedHelpMessage
pub fn template<S: Into<&'b str>>(mut self, s: S) -> Self {
self.p.meta.template = Some(s.into());
self
Expand Down

0 comments on commit cbea3d5

Please sign in to comment.