Skip to content

Commit

Permalink
Do not exit the shell on Ctrl-C (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
certik authored Sep 13, 2024
1 parent 8c1fa87 commit 8b08567
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/shell/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ async fn interactive() -> anyhow::Result<()> {
}
}
Err(ReadlineError::Interrupted) => {
// We start a new prompt on Ctrl-C, like Bash does
println!("CTRL-C");
break;
}
Err(ReadlineError::Eof) => {
// We exit the shell on Ctrl-D, like Bash does
println!("CTRL-D");
break;
}
Expand Down

0 comments on commit 8b08567

Please sign in to comment.