From 33eb0b9eef3360396aa0f650f8e1e01baf6dc181 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 1 Oct 2023 19:13:06 -0600 Subject: cli: Add a command to show cmdline history There is a function for this but it is never used. Showing the history is a useful feature, so add a new 'history' command. Signed-off-by: Simon Glass --- common/cli_readline.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'common/cli_readline.c') diff --git a/common/cli_readline.c b/common/cli_readline.c index 9a7c268719d..f3ba76a62ec 100644 --- a/common/cli_readline.c +++ b/common/cli_readline.c @@ -160,8 +160,7 @@ static char *hist_next(void) return ret; } -#ifndef CONFIG_CMDLINE_EDITING -static void cread_print_hist_list(void) +void cread_print_hist_list(void) { int i; unsigned long n; @@ -179,7 +178,6 @@ static void cread_print_hist_list(void) i++; } } -#endif /* CONFIG_CMDLINE_EDITING */ #define BEGINNING_OF_LINE() { \ while (num) { \ -- cgit v1.2.3