Lines Matching defs:help

35 /// - [Help][crate::Arg#help-1]
49 /// .help("Provides a config file to myprog");
56 pub(crate) help: Option<StyledStr>,
97 /// be displayed when the user prints the usage/help information of the program.
122 /// By default `V` and `h` are used by the auto-generated `version` and `help` arguments,
145 /// To use `-h` for your own flag and still have help:
153 /// .arg(Arg::new("help")
154 /// .long("help")
177 /// By default `version` and `help` are used by the auto-generated `version` and `help`
178 /// arguments, respectively. You may use the word `version` or `help` for the long form of your
180 /// `version` or `help` arguments.
284 /// .help("the file to add")
312 /// .help("the file to add")
330 /// Like [`Arg::alias`], except that they are visible inside the help message.
359 /// Like [`Arg::short_alias`], except that they are visible inside the help message.
388 /// Like [`Arg::aliases`], except that they are visible inside the help message.
414 /// Like [`Arg::short_aliases`], except that they are visible inside the help message.
1109 /// Placeholder for the argument's value in the help message / usage.
1128 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
1129 #[cfg_attr(feature = "help", doc = " ```")]
1135 /// .help("Some help text"))
1137 /// "prog", "--help"
1148 /// --config <FILE> Some help text
1149 /// -h, --help Print help information
1165 /// Placeholders for the argument's values in the help message / usage.
1167 /// These names are cosmetic only, used for help and usage strings only. The names are **not**
1176 /// **Pro Tip:** It may help to use [`Arg::next_line_help(true)`] if there are long, or
1177 /// multiple value names in order to not throw off the help text alignment of all options.
1190 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
1191 #[cfg_attr(feature = "help", doc = " ```")]
1198 /// "prog", "--help"
1210 /// -h, --help Print help information
1211 /// --io-files <INFILE> <OUTFILE> Some help text
1715 /// .help("Specify WHEN to colorize output.")
1999 /// Sets the description of the argument for short help (`-h`).
2003 /// If [`Arg::long_help`] is not specified, this message will be displayed for `--help`.
2005 /// **NOTE:** Only `Arg::help` is used in completion script generation in order to be concise
2009 /// Any valid UTF-8 is allowed in the help text. The one exception is when one wishes to
2010 /// include a newline in the help text and have the following text be properly aligned with all
2011 /// the other help text.
2013 /// Setting `help` displays a short message to the side of the argument when the user passes
2014 /// `-h` or `--help` (by default).
2016 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2017 #[cfg_attr(feature = "help", doc = " ```")]
2022 /// .help("Some help text describing the --config arg"))
2024 /// "prog", "--help"
2036 /// --config Some help text describing the --config arg
2037 /// -h, --help Print help information
2043 pub fn help(mut self, h: impl IntoResettable<StyledStr>) -> Self {
2044 self.help = h.into_resettable().into_option();
2048 /// Sets the description of the argument for long help (`--help`).
2053 /// If [`Arg::help`] is not specified, this message will be displayed for `-h`.
2055 /// **NOTE:** Only [`Arg::help`] is used in completion script generation in order to be concise
2059 /// Any valid UTF-8 is allowed in the help text. The one exception is when one wishes to
2060 /// include a newline in the help text and have the following text be properly aligned with all
2061 /// the other help text.
2063 /// Setting `help` displays a short message to the side of the argument when the user passes
2064 /// `-h` or `--help` (by default).
2066 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2067 #[cfg_attr(feature = "help", doc = " ```")]
2078 /// "prog", "--help"
2096 /// -h, --help
2097 /// Print help information
2102 /// [`Arg::help`]: Arg::help()
2110 /// Allows custom ordering of args within the help message.
2112 /// Args with a lower value will be displayed first in the help message. This is helpful when
2124 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2125 #[cfg_attr(feature = "help", doc = " ```")]
2134 /// .help("Some help and text"))
2143 /// .help("I should be first!"))
2145 /// "prog", "--help"
2149 /// The above example displays the following help message
2157 /// -h, --help Print help information
2160 /// -o, --long-option <a> Some help and text
2171 /// Override the [current] help section.
2181 /// Render the [help][Arg::help] on the line after the argument.
2183 /// This can be helpful for arguments with very long or complex help messages.
2191 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2192 #[cfg_attr(feature = "help", doc = " ```")]
2201 /// .help("Some really long help and complex\n\
2202 /// help that makes more sense to be\n\
2205 /// "prog", "--help"
2209 /// The above example displays the following help message
2217 /// -h, --help Print help information
2220 /// Some really long help and complex
2221 /// help that makes more sense to be
2234 /// Do not display the argument in help message.
2240 /// Setting `Hidden` will hide the argument when displaying help text
2242 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2243 #[cfg_attr(feature = "help", doc = " ```")]
2249 /// .help("Some help text describing the --config arg"))
2251 /// "prog", "--help"
2263 /// -h, --help Print help information
2276 /// Do not display the [possible values][crate::builder::ValueParser::possible_values] in the help message.
2279 /// help text.
2297 /// If we were to run the above program with `--help` the `[values: fast, slow]` portion of
2298 /// the help text would be omitted.
2309 /// Do not display the default value of the argument in the help message.
2311 /// This is useful when default behavior of an arg is explained elsewhere in the help text.
2328 /// If we were to run the above program with `--help` the `[default: localhost]` portion of
2329 /// the help text would be omitted.
2340 /// Do not display in help the environment variable name.
2342 /// This is useful when the variable option is explained elsewhere in the help text.
2356 /// If we were to run the above program with `--help` the `[env: MODE]` portion of the help
2369 /// Do not display in help any values inside the associated ENV variables for the argument.
2386 /// If we were to run the above program with `$ CONNECT=super_secret connect --help` the
2387 /// `[default: CONNECT=super_secret]` portion of the help text would be omitted.
2399 /// Hides an argument from short help (`-h`).
2403 /// **NOTE:** Setting this option will cause next-line-help output style to be used
2404 /// when long help (`--help`) is called.
2414 /// Setting `hide_short_help(true)` will hide the argument when displaying short help text
2416 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2417 #[cfg_attr(feature = "help", doc = " ```")]
2423 /// .help("Some help text describing the --config arg"))
2437 /// -h, --help Print help information
2441 /// However, when --help is called
2443 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2444 #[cfg_attr(feature = "help", doc = " ```")]
2450 /// .help("Some help text describing the --config arg"))
2452 /// "prog", "--help"
2464 /// --config Some help text describing the --config arg
2465 /// -h, --help Print help information
2478 /// Hides an argument from long help (`--help`).
2482 /// **NOTE:** Setting this option will cause next-line-help output style to be used
2483 /// when long help (`--help`) is called.
2487 /// Setting `hide_long_help(true)` will hide the argument when displaying long help text
2489 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2490 #[cfg_attr(feature = "help", doc = " ```")]
2496 /// .help("Some help text describing the --config arg"))
2498 /// "prog", "--help"
2510 /// -h, --help Print help information
2516 #[cfg_attr(not(feature = "help"), doc = " ```ignore")]
2517 #[cfg_attr(feature = "help", doc = " ```")]
2523 /// .help("Some help text describing the --config arg"))
2537 /// --config Some help text describing the --config arg
2538 /// -h, --help Print help information
3703 /// Get the help specified for this argument, if any
3706 self.help.as_ref()
3709 /// Get the long help specified for this argument, if any
3715 /// let arg = Arg::new("foo").long_help("long help");
3716 /// assert_eq!(Some("long help".to_owned()), arg.get_long_help().map(|s| s.to_string()));
3724 /// Get the help heading specified for this argument, if any
3823 /// facing applications, such as building help messages or man files
4238 #[cfg(feature = "help")]
4283 .field("help", &self.help)