pub(crate) fn write_default_help(&mut self) -> ClapResult<()> {
        debug!("Help::write_default_help");
        if let Some(h) = self.parser.app.pre_help {
            self.write_before_after_help(h)?;
            self.none("\n\n")?;
        }

        macro_rules! write_thing {
            ($thing:expr) => {{
                self.none(&wrap_help(&$thing, self.term_w))?;
                self.none("\n")?
            }};
        }

        // Print the version
        self.write_bin_name()?;
        self.none(" ")?;
        self.write_version()?;
        self.none("\n")?;

        if let Some(author) = self.parser.app.author {
            write_thing!(author);
        }

        if self.use_long && self.parser.app.long_about.is_some() {
            debug!("Help::write_default_help: writing long about");
            write_thing!(self.parser.app.long_about.unwrap());
        } else if self.parser.app.about.is_some() {
            debug!("Help::write_default_help: writing about");
            write_thing!(self.parser.app.about.unwrap());
        }

        self.none("\n")?;
        self.warning("USAGE:")?;
        self.none(&format!(
            "\n{}{}\n\n",
            TAB,
            Usage::new(self.parser).create_usage_no_title(&[])
        ))?;

        let flags = self.parser.has_flags();
        let pos = self.parser.has_positionals();
        let opts = self.parser.has_opts();
        let subcmds = self.parser.has_subcommands();

        if flags || opts || pos || subcmds {
            self.write_all_args()?;
        }

        if let Some(h) = self.parser.app.more_help {
            if flags || opts || pos || subcmds {
                self.none("\n\n")?;
            }
            self.write_before_after_help(h)?;
        }

        self.writer.flush().map_err(Error::from)
    }
/// Writes default help for a Parser Object to the wrapped stream.
Writes default help for a Parser Object to the wrapped stream.
Writes default help for a Parser Object to the wrapped stream .
pub(crate) fn write_default_help(&mut self) -> ClapResult<()> {
        debug!("Help::write_default_help");
        if let Some(h) = self.parser.app.pre_help {
            self.write_before_after_help(h)?;
            self.none("\n\n")?;
        }
        macro_rules! write_thing {
            ($thing:expr) => {{
                self.none(&wrap_help(&$thing, self.term_w))?;
                self.none("\n")?
            }};
        }
        // Print the version
        self.write_bin_name()?;
        self.none(" ")?;
        self.write_version()?;
        self.none("\n")?;
        if let Some(author) = self.parser.app.author {
            write_thing!(author);
        }
        if self.use_long && self.parser.app.long_about.is_some() {
            debug!("Help::write_default_help: writing long about");
            write_thing!(self.parser.app.long_about.unwrap());
        } else if self.parser.app.about.is_some() {
            debug!("Help::write_default_help: writing about");
            write_thing!(self.parser.app.about.unwrap());
        }
        self.none("\n")?;
        self.warning("USAGE:")?;
        self.none(&format!(
            "\n{}{}\n\n",
            TAB,
            Usage::new(self.parser).create_usage_no_title(&[])
        ))?;
        let flags = self.parser.has_flags();
        let pos = self.parser.has_positionals();
        let opts = self.parser.has_opts();
        let subcmds = self.parser.has_subcommands();
        if flags || opts || pos || subcmds {
            self.write_all_args()?;
        }
        if let Some(h) = self.parser.app.more_help {
            if flags || opts || pos || subcmds {
                self.none("\n\n")?;
            }
            self.write_before_after_help(h)?;
        }
        self.writer.flush().map_err(Error::from)
    }
pub ( crate ) fn write_default_help ( & mut self ) -> ClapResult < ( ) > { debug ! ( " " ) ; if let Some ( h ) = self . parser . app . pre_help { self . write_before_after_help ( h ) ? ; self . none ( " \n \n " ) ? ; } macro_rules! write_thing { ( $thing : expr ) => { { self none ( wrap_help ( $thing self term_w ) ) self none ( " \n " ) } } ; } // Print the version self . write_bin_name ( ) ? ; self . none ( " " ) ? ; self . write_version ( ) ? ; self . none ( " \n " ) ? ; if let Some ( author ) = self . parser . app . author { write_thing ! ( author ) ; } if self . use_long && self . parser . app . long_about . is_some ( ) { debug ! ( " " ) ; write_thing ! ( self parser app long_about unwrap ( ) ) ; } else if self . parser . app . about . is_some ( ) { debug ! ( " " ) ; write_thing ! ( self parser app about unwrap ( ) ) ; } self . none ( " \n " ) ? ; self . warning ( " " ) ? ; self . none ( & format ! ( " \n \n \n " TAB Usage new ( self parser ) create_usage_no_title ( [ ] ) ) ) ? ; let flags = self . parser . has_flags ( ) ; let pos = self . parser . has_positionals ( ) ; let opts = self . parser . has_opts ( ) ; let subcmds = self . parser . has_subcommands ( ) ; if flags || opts || pos || subcmds { self . write_all_args ( ) ? ; } if let Some ( h ) = self . parser . app . more_help { if flags || opts || pos || subcmds { self . none ( " \n \n " ) ? ; } self . write_before_after_help ( h ) ? ; } self . writer . flush ( ) . map_err ( Error :: from ) }
Writes default help for a Parser Object to the wrapped stream.
Writes default help for a Parser Object to the wrapped stream .
&mut self
&mut self