mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
docs(AllowHyphenValues): updates the docs to remove old limitations that no longer apply
This commit is contained in:
parent
4048072021
commit
52d110df81
1 changed files with 2 additions and 3 deletions
|
@ -162,11 +162,9 @@ pub enum AppSettings {
|
|||
/// Specifies that leading hyphens are allowed in argument *values*, such as negative numbers
|
||||
/// like `-10`. (which would otherwise be parsed as another flag or option)
|
||||
///
|
||||
/// **NOTE:** This can only be set application wide and not on a per argument basis.
|
||||
///
|
||||
/// **NOTE:** Use this setting with caution as it silences certain circumstances which would
|
||||
/// otherwise be an error (such as accidentally forgetting to specify a value for leading
|
||||
/// option)
|
||||
/// option). It is preferred to set this on a per argument basis, via [`Arg::allow_hyphen_values`]
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -183,6 +181,7 @@ pub enum AppSettings {
|
|||
/// assert_eq!(m.value_of("neg"), Some("-20"));
|
||||
/// # ;
|
||||
/// ```
|
||||
/// [`Arg::allow_hyphen_values`]: ./struct.Arg.html#method.allow_hyphen_values
|
||||
AllowLeadingHyphen,
|
||||
|
||||
/// Allows negative numbers to pass as values. This is similar to
|
||||
|
|
Loading…
Reference in a new issue