The command 'echo | more -s' ends in infinite loop if exit-on-EOF is
disabled (default now). We need to call more_key_command() to ask for
user's reaction.
Fixes: https://github.com/util-linux/util-linux/issues/1669
Signed-off-by: Karel Zak <kzak@redhat.com>
putp(ctl->clear_rest);
return;
}
- if (ctl->squeeze_spaces && length == 0 && prev_len == 0)
+ if (ctl->squeeze_spaces && length == 0 && prev_len == 0 && !ctl->is_eof)
continue;
prev_len = length;
if (ctl->bad_stdout