summaryrefslogtreecommitdiff
path: root/cli/repl.rs
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2020-10-19 20:06:21 +0800
committerGitHub <noreply@github.com>2020-10-19 14:06:21 +0200
commit8eb44537ecb35aebf2aa95018ab8806ab899e0f7 (patch)
tree9c67352fc1a43381c69df8270544a24ed74c9eee /cli/repl.rs
parentf5c23f8058ed7ce85846c6b1e623329a09fa1a76 (diff)
fix(cli/repl): keyboard interrupt should continue (#7960)
This changes the behavior of keyboard interrupts (ctrl+c) to continue, clearing the current line instead of exiting. Exit can still be done with ctrl+d or by calling close().
Diffstat (limited to 'cli/repl.rs')
-rw-r--r--cli/repl.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/repl.rs b/cli/repl.rs
index be887e941..1bb5df096 100644
--- a/cli/repl.rs
+++ b/cli/repl.rs
@@ -402,7 +402,8 @@ pub async fn run(
editor.lock().unwrap().add_history_entry(line.as_str());
}
Err(ReadlineError::Interrupted) => {
- break;
+ println!("exit using ctrl+d or close()");
+ continue;
}
Err(ReadlineError::Eof) => {
break;