From fe927d870601af570b22889ecc267b008af35404 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sat, 27 Jul 2024 07:59:41 +0100 Subject: lineedit: use stdout for shell history builtin 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. Saves 16 bytes. (GitHub issue #433) --- libbb/lineedit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index bd4a17348..7f26bb8e0 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1653,7 +1653,12 @@ void FAST_FUNC show_history(const line_input_t *st) if (!st) return; for (i = 0; i < st->cnt_history; i++) +#if ENABLE_PLATFORM_MINGW32 + /* Upstream erred, a patch has been submitted */ + printf("%4d %s\n", i, st->history[i]); +#else fprintf(stderr, "%4d %s\n", i, st->history[i]); +#endif } # if ENABLE_FEATURE_EDITING_SAVEHISTORY -- cgit v1.2.3-55-g6feb