forked from AbleScript/ablescript
added simple history support
This commit is contained in:
parent
6fc1f59e23
commit
9fa6b57fe5
|
@ -15,6 +15,8 @@ pub fn repl(ast_print: bool) {
|
|||
match rl.readline(if partial.is_some() { ">> " } else { ":: " }) {
|
||||
Ok(readline) => {
|
||||
let readline = readline.trim_end();
|
||||
rl.add_history_entry(readline);
|
||||
|
||||
let partial_data = match partial {
|
||||
Some(line) => line + &readline,
|
||||
None => readline.to_owned(),
|
||||
|
|
Loading…
Reference in a new issue