]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
normal/help: Add paging instructions to normal and help prompts
authorRobbie Harwood <rharwood@redhat.com>
Fri, 4 Nov 2022 17:05:37 +0000 (13:05 -0400)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 14 Nov 2022 16:37:51 +0000 (17:37 +0100)
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 <rharwood@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/help.c
grub-core/normal/main.c

index ac3907f9df025df6d4ab2a17879110ad19d30067..113d0d0caeb4b6ce0916ff39968ce839604ded85 100644 (file)
@@ -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;
 }
 
index cb0e8e7fd2c7576f0a3f0777bf29c8526793f62a..bd44310005d45de91907945130ed61a8a58d4d55 100644 (file)
@@ -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;