const ALLOW_MISSING_POS = 1 << 33;
const TRAILING_VALUES = 1 << 34;
const VALID_NEG_NUM_FOUND = 1 << 35;
- const PROPOGATED = 1 << 36;
+ const PROPAGATED = 1 << 36;
const VALID_ARG_FOUND = 1 << 37;
const INFER_SUBCOMMANDS = 1 << 38;
const CONTAINS_LAST = 1 << 39;
WaitOnError => WAIT_ON_ERROR,
TrailingValues => TRAILING_VALUES,
ValidNegNumFound => VALID_NEG_NUM_FOUND,
- Propogated => PROPOGATED,
+ Propagated => PROPAGATED,
ValidArgFound => VALID_ARG_FOUND,
InferSubcommands => INFER_SUBCOMMANDS,
ContainsLast => CONTAINS_LAST
/// ```
NextLineHelp,
- /// Specifies that the parser should propagate global arg's values down through any *used* child
- /// subcommands. Meaning, if a subcommand wasn't used, the values won't be propagated down to
+ /// **DEPRECATED**: This setting is no longer required in order to propagate values up or down
+ ///
+ /// Specifies that the parser should propagate global arg's values down or up through any *used*
+ /// child subcommands. Meaning, if a subcommand wasn't used, the values won't be propagated to
/// said subcommand.
///
- /// **NOTE:** Values are only propagated *down* through futher child commands, not up
- ///
/// # Examples
///
/// ```rust
/// # use clap::{App, Arg, AppSettings, SubCommand};
/// let m = App::new("myprog")
- /// .setting(AppSettings::PropagateGlobalValuesDown)
/// .arg(Arg::from_usage("[cmd] 'command to run'")
/// .global(true))
/// .subcommand(SubCommand::with_name("foo"))
/// ```rust
/// # use clap::{App, Arg, AppSettings, SubCommand};
/// let m = App::new("myprog")
- /// .setting(AppSettings::PropagateGlobalValuesDown)
/// .arg(Arg::from_usage("[cmd] 'command to run'")
/// .global(true))
/// .subcommand(SubCommand::with_name("foo"))
///
/// assert!(m.subcommand_matches("foo").is_none());
/// ```
+ #[deprecated(since = "2.27.0", note = "No longer required to propagate values")]
PropagateGlobalValuesDown,
/// Allows [`SubCommand`]s to override all requirements of the parent command.
ValidNegNumFound,
#[doc(hidden)]
- Propogated,
+ Propagated,
#[doc(hidden)]
ValidArgFound,
"waitonerror" => Ok(AppSettings::WaitOnError),
"validnegnumfound" => Ok(AppSettings::ValidNegNumFound),
"validargfound" => Ok(AppSettings::ValidArgFound),
- "propogated" => Ok(AppSettings::Propogated),
+ "propagated" => Ok(AppSettings::Propagated),
"trailingvalues" => Ok(AppSettings::TrailingValues),
_ => Err("unknown AppSetting, cannot convert from str".to_owned()),
}
AppSettings::ValidNegNumFound);
assert_eq!("validargfound".parse::<AppSettings>().unwrap(),
AppSettings::ValidArgFound);
- assert_eq!("propogated".parse::<AppSettings>().unwrap(),
- AppSettings::Propogated);
+ assert_eq!("propagated".parse::<AppSettings>().unwrap(),
+ AppSettings::Propagated);
assert_eq!("trailingvalues".parse::<AppSettings>().unwrap(),
AppSettings::TrailingValues);
assert_eq!("infersubcommands".parse::<AppSettings>().unwrap(),