Merge pull request #589 from jankoprowski/eof

Stop printing CTRL-D on EOF
This commit is contained in:
Jonathan Turner 2019-09-04 08:43:18 +12:00 committed by GitHub
commit c6c4d4ddb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -451,10 +451,7 @@ async fn process_line(readline: Result<String, ReadlineError>, ctx: &mut Context
LineResult::Success(line.clone()) LineResult::Success(line.clone())
} }
Err(ReadlineError::Interrupted) => LineResult::CtrlC, Err(ReadlineError::Interrupted) => LineResult::CtrlC,
Err(ReadlineError::Eof) => { Err(ReadlineError::Eof) => LineResult::Break,
println!("CTRL-D");
LineResult::Break
}
Err(err) => { Err(err) => {
println!("Error: {:?}", err); println!("Error: {:?}", err);
LineResult::Break LineResult::Break