fix(repl): history

This commit is contained in:
2025-05-11 12:55:56 +08:00
parent be0c416c13
commit 07b486848f

View File

@@ -26,12 +26,12 @@ fn main() -> Result<()> {
if expr.trim().is_empty() {
continue;
}
rl.add_history_entry(expr.as_str())?;
let downgraded = unwrap!(downgrade(
rnix::Root::parse(expr.as_str()).tree().expr().unwrap()
));
let prog = compile(downgraded);
println!("{}", unwrap!(run(prog)));
rl.add_history_entry(expr.as_str())?;
}
Err(ReadlineError::Interrupted) => {
println!("CTRL-C");