Skip to content

Commit 8b08567

Browse files
authored
Do not exit the shell on Ctrl-C (#122)
1 parent 8c1fa87 commit 8b08567

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/shell/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,11 @@ async fn interactive() -> anyhow::Result<()> {
127127
}
128128
}
129129
Err(ReadlineError::Interrupted) => {
130+
// We start a new prompt on Ctrl-C, like Bash does
130131
println!("CTRL-C");
131-
break;
132132
}
133133
Err(ReadlineError::Eof) => {
134+
// We exit the shell on Ctrl-D, like Bash does
134135
println!("CTRL-D");
135136
break;
136137
}

0 commit comments

Comments
 (0)