pub fn show_parse_command(&mut self) -> PromptResult {
        let prompt_txt = self.prompt();

        let input = self.editor.readline(prompt_txt.as_ref());
        match input {
            Ok(line) => self.parse_command(&line),
            Err(ReadlineError::Interrupted) => {
                // TODO: Unhandled for now!
                println!("^C");
                Err(Box::new(NoCommandError))
            }
            Err(ReadlineError::Eof) => Err(Box::new(EofError)),
            Err(err) => {
                println!("Error: {:?}", err);
                Err(Box::new(err))
            }
        }
    }
/// Shows prompt and reads command and arguments from stdin.
Shows prompt and reads command and arguments from stdin.
Shows prompt and reads command and arguments from stdin .
pub fn show_parse_command(&mut self) -> PromptResult {
        let prompt_txt = self.prompt();
        let input = self.editor.readline(prompt_txt.as_ref());
        match input {
            Ok(line) => self.parse_command(&line),
            Err(ReadlineError::Interrupted) => {
                // TODO: Unhandled for now!
                println!("^C");
                Err(Box::new(NoCommandError))
            }
            Err(ReadlineError::Eof) => Err(Box::new(EofError)),
            Err(err) => {
                println!("Error: {:?}", err);
                Err(Box::new(err))
            }
        }
    }
pub fn show_parse_command ( & mut self ) -> PromptResult { let prompt_txt = self . prompt ( ) ; let input = self . editor . readline ( prompt_txt . as_ref ( ) ) ; match input { Ok ( line ) => self . parse_command ( & line ) , Err ( ReadlineError :: Interrupted ) => { // TODO: Unhandled for now! println ! ( " " ) ; Err ( Box :: new ( NoCommandError ) ) } Err ( ReadlineError :: Eof ) => Err ( Box :: new ( EofError ) ) , Err ( err ) => { println ! ( " " err ) ; Err ( Box :: new ( err ) ) } } }
Shows prompt and reads command and arguments from stdin.
Shows prompt and reads command and arguments from stdin .
&mut self