EOF should maybe yield ReadlineError::Eof
instead of just terminating Editor::iter
#647
Labels
ReadlineError::Eof
instead of just terminating Editor::iter
#647
Context
I'm using using rustyline for the first time in a situation like this:
I wanted to bind both Ctrl-D and Ctrl-C to exiting, as my program isn't hosting anything else it could reach out to for processing the interrupt. But to my surprise, it seems like
Eof
is never emitted when usingEditor::iter
, it just plainly ends the iterator. I'd have expected it to be a constant stream of events.Suggestions
Editor::iter
infinite, while providingReadlineError::Eof
as a normal "error". (I'd be open to implement that and open a PR, if wanted)Editor::iter
logical OR inReadlineError::Eof
the special case of when the iterator terminates.Minimal reproducable code example
Relying on rustyline
10.0.0
The text was updated successfully, but these errors were encountered: