Save interpreter directives in history
This commit is contained in:
parent
6768cebc48
commit
29cabb119f
@ -237,12 +237,10 @@ impl Repl {
|
|||||||
println!("Terminal read error: {}", e);
|
println!("Terminal read error: {}", e);
|
||||||
},
|
},
|
||||||
Ok(ref input) => {
|
Ok(ref input) => {
|
||||||
|
self.console.get_history().add(input);
|
||||||
let output = match input.chars().nth(0) {
|
let output = match input.chars().nth(0) {
|
||||||
Some(ch) if ch == self.interpreter_directive_sigil => self.handle_interpreter_directive(input),
|
Some(ch) if ch == self.interpreter_directive_sigil => self.handle_interpreter_directive(input),
|
||||||
_ => {
|
_ => Some(self.input_handler(input)),
|
||||||
self.console.get_history().add(input);
|
|
||||||
Some(self.input_handler(input))
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
if let Some(o) = output {
|
if let Some(o) = output {
|
||||||
println!("=> {}", o);
|
println!("=> {}", o);
|
||||||
|
Loading…
Reference in New Issue
Block a user