From b2bdbef561fbb89e0bcfb42778e6610138d8ce04 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Mon, 20 Jul 2020 15:37:39 +0100 Subject: [PATCH] ksh -i: only print newline on EOF if really interactive Some regression tests have to be run with the -i option, making the shell behave (mostly) as if it is interactive. This causes ksh to print a final newline upon EOF (Ctrl+D). This is functional if the shell is really interactive, i.e. if standard input is on a terminal and we're not running a shell script: it ensures that a parent shell's prompt appears on a new line. But for tests like ksh -i -c 'testcommands' or ksh -i <