aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-07-27 07:51:35 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2024-09-27 20:16:23 +0200
commit39c5c08b28f14e02611d5c79e357fb7432da1e25 (patch)
treede9733de240af538be67ac2a5b5478b6b44e6086
parent26895db35d4b9160ff5f2fe1f942e1ddbf58747d (diff)
downloadbusybox-w32-39c5c08b28f14e02611d5c79e357fb7432da1e25.tar.gz
busybox-w32-39c5c08b28f14e02611d5c79e357fb7432da1e25.tar.bz2
busybox-w32-39c5c08b28f14e02611d5c79e357fb7432da1e25.zip
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. 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 <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/lineedit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 314fedf5c..151208c1c 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1463,7 +1463,7 @@ void FAST_FUNC show_history(const line_input_t *st)
1463 if (!st) 1463 if (!st)
1464 return; 1464 return;
1465 for (i = 0; i < st->cnt_history; i++) 1465 for (i = 0; i < st->cnt_history; i++)
1466 fprintf(stderr, "%4d %s\n", i, st->history[i]); 1466 printf("%4d %s\n", i, st->history[i]);
1467} 1467}
1468 1468
1469# if ENABLE_FEATURE_EDITING_SAVEHISTORY 1469# if ENABLE_FEATURE_EDITING_SAVEHISTORY