Add cls command
PATCH 1/2 Add cls command
* commands/minicmd.c: Add cls command.
It's nice to clear the screen once in a while, after a lot of messing around in the command line.
-joe
commands/minicmd.c +0 -0
@@ -336,8 +336,19 @@return 0 ;
}
+/* cls */
+static grub_err_t
+grub_mini_cmd_cls (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ grub_cls ();
+ return 0;
+}
+
static grub_command_t cmd_cat, cmd_help, cmd_root;
static grub_command_t cmd_dump, cmd_rmmod, cmd_lsmod, cmd_exit; +static grub_command_t cmd_cls;
GRUB_MOD_INIT(minicmd)
{
@@ -362,6 +373,9 @@
cmd_exit =
grub_register_command ("exit", grub_mini_cmd_exit,
0, "exit from GRUB");
+ cmd_cls =
+ grub_register_command ("cls", grub_mini_cmd_cls,
+ 0, "clear the screen");
}
GRUB_MOD_FINI(minicmd)
@@ -373,4 +387,5 @@
grub_unregister_command (cmd_rmmod);
grub_unregister_command (cmd_lsmod);
grub_unregister_command (cmd_exit);
+ grub_unregister_command (cmd_cls);
}