From cf569438f309c199800bb8e46c9f140187de69d7 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Mon, 15 May 2017 18:17:53 -0400 Subject: [PATCH] docs(App::template): adds details about the necessity to use AppSettings::UnifiedHelpMessage when using {unified} tags in the help template Closes #949 --- src/app/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 0c9f9aeeee5..03721386d53 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -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. @@ -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>(mut self, s: S) -> Self { self.p.meta.template = Some(s.into()); self