From c942e50a5f22ee024a2db7f70b8b1d95559a407c Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sat, 27 Jul 2024 01:16:33 +0100 Subject: [PATCH] lineedit: use stdout for shell history builtin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit fd47f0567 (lineedit: print prompt and editing operations to stderr) changed various print statements to output to stderr. The change in show_history() caused the shell history builtin to send its output to stderr. Revert that part of the commit. function old new delta show_history 47 42 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5) Total: -5 bytes Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko Signed-off-by: Sören Tempel --- libbb/lineedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 543a3f11c..3e06a4bc5 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1463,7 +1463,7 @@ void FAST_FUNC show_history(const line_input_t *st) if (!st) return; for (i = 0; i < st->cnt_history; i++) - fprintf(stderr, "%4d %s\n", i, st->history[i]); + printf("%4d %s\n", i, st->history[i]); } # if ENABLE_FEATURE_EDITING_SAVEHISTORY