pub fn process_command(&mut self) {
        let input = self.console.clear_input();

        match handle_cmd(nom::types::CompleteStr(&input)) {
            Ok((_, cmd)) => {
                if let Err(err) = cmd.exec(self) {
                    self.console.write(err.display());
                }
            }
            Err(e) => {
                if let nom::Err::Error(nom::Context::Code(_, nom::ErrorKind::Custom(cmd_err))) = e {
                    self.console.write(cmd_err.display());
                } else {
                    self.console.write(CmdError::ParseErr.display());
                }
            }
        }
    }
// Processes the current console buffer as a command
Processes the current console buffer as a command
Processes the current console buffer as a command
pub fn process_command(&mut self) {
        let input = self.console.clear_input();
        match handle_cmd(nom::types::CompleteStr(&input)) {
            Ok((_, cmd)) => {
                if let Err(err) = cmd.exec(self) {
                    self.console.write(err.display());
                }
            }
            Err(e) => {
                if let nom::Err::Error(nom::Context::Code(_, nom::ErrorKind::Custom(cmd_err))) = e {
                    self.console.write(cmd_err.display());
                } else {
                    self.console.write(CmdError::ParseErr.display());
                }
            }
        }
    }
pub fn process_command ( & mut self ) { let input = self . console . clear_input ( ) ; match handle_cmd ( nom :: types :: CompleteStr ( & input ) ) { Ok ( ( _ , cmd ) ) => { if let Err ( err ) = cmd . exec ( self ) { self . console . write ( err . display ( ) ) ; } } Err ( e ) => { if let nom :: Err :: Error ( nom :: Context :: Code ( _ , nom :: ErrorKind :: Custom ( cmd_err ) ) ) = e { self . console . write ( cmd_err . display ( ) ) ; } else { self . console . write ( CmdError :: ParseErr . display ( ) ) ; } } } }
Processes the current console buffer as a command
Processes the current console buffer as a command
&mut self