Fix Ctrl-D exit in cli (#508)

Clears to a new line for the potentially hosting process
Remove the output for `Ctrl-C`
This commit is contained in:
Stefan Holderbach 2021-12-16 22:40:12 +01:00 committed by GitHub
parent bf6780967b
commit efb4a9f95c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,9 +362,11 @@ fn main() -> Result<()> {
); );
} }
Ok(Signal::CtrlC) => { Ok(Signal::CtrlC) => {
println!("Ctrl-c"); // `Reedline` clears the line content. New prompt is shown
} }
Ok(Signal::CtrlD) => { Ok(Signal::CtrlD) => {
// When exiting clear to a new line
println!();
break; break;
} }
Ok(Signal::CtrlL) => { Ok(Signal::CtrlL) => {