# HG changeset patch # User David Barts # Date 1719969509 25200 # Node ID af86b8e0b88c7b838fe0cf060bcaba071f582dd5 # Parent 07406c4af4a53a67849496e16d812405d012d013 Clean up exit output. diff -r 07406c4af4a5 -r af86b8e0b88c PassMan.iml --- a/PassMan.iml Tue Jul 02 17:34:52 2024 -0700 +++ b/PassMan.iml Tue Jul 02 18:18:29 2024 -0700 @@ -1,57 +1,12 @@ - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 07406c4af4a5 -r af86b8e0b88c src/main/kotlin/name/blackcap/passman/Main.kt --- a/src/main/kotlin/name/blackcap/passman/Main.kt Tue Jul 02 17:34:52 2024 -0700 +++ b/src/main/kotlin/name/blackcap/passman/Main.kt Tue Jul 02 18:18:29 2024 -0700 @@ -49,7 +49,11 @@ val QUIT = setOf("exit", "quit") var lastStatus = 0 while (true) { - val rawLine = System.console()?.readLine("passman> ") ?: break + val rawLine = System.console()?.readLine("passman> ") + if (rawLine == null) { + println() // ensure shell prompt comes out on a line of its own + break + } val s = Shplitter() s.feed(rawLine) if (!s.complete) { @@ -82,7 +86,6 @@ lastStatus = 1 } } - println() // ensure shell prompt comes out on a line of its own exitProcess(lastStatus) }