jline/jline2 — pull request #46 by trptcolin (2012-06-17 16:07:16+00:00)
Title: Handle EOF / Ctrl-D on unsupported terminals

When we have an UnsupportedTerminal, there's no way to get `null` back from `ConsoleReader.readLine()`, so programs calling it have no way to tell the difference between EOF and a newline.

This patch returns `null` where `readCharacter()` says we have an EOF *and* the buffer is empty, which matches the `readLine()` [behavior for supported terminals](https://github.com/jline/jline2/blob/master/src/main/java/jline/console/ConsoleReader.java#L2470-2473).