diff --git a/src/main.rs b/src/main.rs index a69d279..7f4ebbf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,9 @@ fn get_input(rl: &mut Editor<()>) -> Result { line.truncate(line.trim_end().len()); Ok(line) } - Err(ReadlineError::Interrupted) | Err(ReadlineError::Eof) => Ok(":q".to_string()), + // ^C: like in a shell, abort the current input + Err(ReadlineError::Interrupted) => Ok("".to_string()), + Err(ReadlineError::Eof) => Ok(":q".to_string()), Err(e) => Err(e), } }