From efb4a9f95ce331e3f5110b796b0752af6a630eec Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Thu, 16 Dec 2021 22:40:12 +0100 Subject: [PATCH] Fix `Ctrl-D` exit in cli (#508) Clears to a new line for the potentially hosting process Remove the output for `Ctrl-C` --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0d52bca078..94acf9d63c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -362,9 +362,11 @@ fn main() -> Result<()> { ); } Ok(Signal::CtrlC) => { - println!("Ctrl-c"); + // `Reedline` clears the line content. New prompt is shown } Ok(Signal::CtrlD) => { + // When exiting clear to a new line + println!(); break; } Ok(Signal::CtrlL) => {