mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 23:04:23 +00:00
fix: Fixes a regression where --help couldn't be overridden
Closes #1112
This commit is contained in:
parent
a224cdcc87
commit
a283d69fc0
2 changed files with 3 additions and 1 deletions
|
@ -75,6 +75,7 @@ impl<'a, 'b> Parser<'a, 'b>
|
|||
pub fn with_name(n: String) -> Self {
|
||||
Parser {
|
||||
meta: AppMeta::with_name(n),
|
||||
g_settings: AppFlags::zeroed(),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
@ -1811,7 +1812,7 @@ impl<'a, 'b> Parser<'a, 'b>
|
|||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
pub fn add_env(&mut self, matcher: &mut ArgMatcher<'a>) -> ClapResult<()> {
|
||||
macro_rules! add_val {
|
||||
($_self:ident, $a:ident, $m:ident) => {
|
||||
|
|
|
@ -67,6 +67,7 @@ impl Default for AppFlags {
|
|||
#[allow(deprecated)]
|
||||
impl AppFlags {
|
||||
pub fn new() -> Self { AppFlags::default() }
|
||||
pub fn zeroed() -> Self { AppFlags(Flags::empty()) }
|
||||
|
||||
impl_settings! { AppSettings,
|
||||
ArgRequiredElseHelp => Flags::A_REQUIRED_ELSE_HELP,
|
||||
|
|
Loading…
Reference in a new issue