fix(repl): history
This commit is contained in:
@@ -26,12 +26,12 @@ fn main() -> Result<()> {
|
|||||||
if expr.trim().is_empty() {
|
if expr.trim().is_empty() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
rl.add_history_entry(expr.as_str())?;
|
||||||
let downgraded = unwrap!(downgrade(
|
let downgraded = unwrap!(downgrade(
|
||||||
rnix::Root::parse(expr.as_str()).tree().expr().unwrap()
|
rnix::Root::parse(expr.as_str()).tree().expr().unwrap()
|
||||||
));
|
));
|
||||||
let prog = compile(downgraded);
|
let prog = compile(downgraded);
|
||||||
println!("{}", unwrap!(run(prog)));
|
println!("{}", unwrap!(run(prog)));
|
||||||
rl.add_history_entry(expr.as_str())?;
|
|
||||||
}
|
}
|
||||||
Err(ReadlineError::Interrupted) => {
|
Err(ReadlineError::Interrupted) => {
|
||||||
println!("CTRL-C");
|
println!("CTRL-C");
|
||||||
|
|||||||
Reference in New Issue
Block a user