/// locate the sub command by the args given
locate the sub command by the args given
locate the sub command by the args given
pub fn locate_subcommand(&self, args: &[&str]) -> Option<&Command> {
        if !args.is_empty() {
            if let Some(found) = self
                .subcommands
                .iter()
                .find(|&c| c.name == args[0] || c.alias.as_ref().map_or(false, |a| a == args[0]))
            {
                found.locate_subcommand(args[1..].to_vec().as_ref())
            } else {
                None
            }
        } else {
            Some(self)
        }
    }
pub fn locate_subcommand ( & self , args : & [ & str ] ) -> Option < & Command > { if ! args . is_empty ( ) { if let Some ( found ) = self . subcommands . iter ( ) . find ( | & c | c . name == args [ 0 ] || c . alias . as_ref ( ) . map_or ( false , | a | a == args [ 0 ] ) ) { found . locate_subcommand ( args [ 1 .. ] . to_vec ( ) . as_ref ( ) ) } else { None } } else { Some ( self ) } }
locate the sub command by the args given
locate the sub command by the args given
&self
args
&[&str]