From f5759a878e137321c77a542efb9bc4c55634a382 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Fri, 4 Nov 2022 13:05:37 -0400 Subject: [PATCH] normal/help: Add paging instructions to normal and help prompts This is not an ideal solution, as interactive users must always run a command in order to get the behavior they want, but it avoids problematic interactions between prompting and sourcing files. Signed-off-by: Robbie Harwood Reviewed-by: Daniel Kiper --- grub-core/commands/help.c | 2 ++ grub-core/normal/main.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/grub-core/commands/help.c b/grub-core/commands/help.c index ac3907f9d..113d0d0ca 100644 --- a/grub-core/commands/help.c +++ b/grub-core/commands/help.c @@ -135,6 +135,8 @@ grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc, } } + grub_printf ("\n\nTo enable less(1)-like paging, \"set pager=1\".\n"); + return 0; } diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c index cb0e8e7fd..bd4431000 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -380,7 +380,8 @@ grub_normal_reader_init (int nested) msg_formatted = grub_xasprintf (_("Minimal BASH-like line editing is supported. For " "the first word, TAB lists possible command completions. Anywhere " - "else TAB lists possible device or file completions. %s"), + "else TAB lists possible device or file completions. To enable " + "less(1)-like paging, \"set pager=1\". %s"), nested ? msg_esc : ""); if (!msg_formatted) return grub_errno; -- 2.47.2