Alias cls as clear
PATCH 2/2 Alias cls as clear
* commands/minicmd.c: Add clear as alias for cls.
My background is in Unix, so 'clear' comes much more naturally to my fingers than 'cls'. But it's bad to clutter grub with too many commands. So I leave this to the maintainers: do we add both commands, only one, or neither?
-joe
commands/minicmd.c +0 -0
@@ -348,7 +348,7 @@
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;
+static grub_command_t cmd_cls, cmd_clear;
GRUB_MOD_INIT(minicmd)
{
@@ -376,6 +376,9 @@
cmd_cls =
grub_register_command ("cls", grub_mini_cmd_cls,
0, "clear the screen");
+ cmd_clear =
+ grub_register_command ("clear", grub_mini_cmd_cls,
+ 0, "clear the screen");
}
GRUB_MOD_FINI(minicmd)
@@ -388,4 +391,5 @@
grub_unregister_command (cmd_lsmod);
grub_unregister_command (cmd_exit);
grub_unregister_command (cmd_cls);
+ grub_unregister_command (cmd_clear);
}
Quoted 7 lines · Joe Auricchio
*
commands/minicmd.c: Add clear as alias for cls.My background is in Unix, so 'clear' comes much more naturally to my fingers than 'cls'. But it's bad to clutter grub with too many commands. So I leave this to the maintainers: do we add both commands, only one, or
neither?
Let's have "clear" only, as it's more clear :-)
Please include the ChangeLog entry.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 9 lines · Pavel Roskin
Quoted 7 lines · Joe Auricchio
*
commands/minicmd.c: Add clear as alias for cls.My background is in Unix, so 'clear' comes much more naturally to my fingers than 'cls'. But it's bad to clutter grub with too many commands. So I leave this to the maintainers: do we add both commands, only one, or
neither?
Quoted 3 lines
Let's have "clear" only, as it's more clear :-)
Please include the ChangeLog entry.
How's this?
-joe
commands/minicmd.c +15 -0
@@ -336,8 +336,19 @@return 0 ; } +/* clear */ +static grub_err_t +grub_mini_cmd_clear (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_clear;GRUB_MOD_INIT (minicmd) {
@@ -362,6 +373,9 @@ cmd_exit =grub_register_command ("exit" , grub_mini_cmd_exit,0 ,"exit from GRUB" ); + cmd_clear = +grub_register_command ("clear" , grub_mini_cmd_clear, +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_clear); }
ChangeLog +4 -0
@@ -1,3 +1,7 @@ +2009-07-23 Joe Auricchio <[email protected]> + + * commands/minicmd.c: Add clear command. + 2009-07-23 Pavel Roskin <[email protected]> * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
Quoted 13 lines · Joe Auricchio
Quoted 11 lines · Pavel Roskin
Quoted 9 lines · Joe Auricchio
*
commands/minicmd.c: Add clear as alias for cls.My background is in Unix, so 'clear' comes much more naturally to my fingers than 'cls'. But it's bad to clutter grub with too many commands.
So I leave this to the maintainers: do we add both commands, only one,
or
neither?
Quoted 6 lines
Quoted 3 lines
Let's have "clear" only, as it's more clear :-)
Please include the ChangeLog entry.
How's this?
The ChangeLog entry is incomplete. It should be e.g.:
* commands/minicmd.c (grub_mini_cmd_clear): New function.
etc. See other entries as an example.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Quoted 10 lines · Robert Millan
Quoted 3 lines · Joe Auricchio
How's this?
The ChangeLog entry is incomplete. It should be e.g.:
*
commands/minicmd.c(grub_mini_cmd_clear): New function.etc. See other entries as an example.
Updated patch attached.
commands/minicmd.c +15 -0
@@ -336,8 +336,19 @@return 0 ; } +/* clear */ +static grub_err_t +grub_mini_cmd_clear (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_clear;GRUB_MOD_INIT (minicmd) {
@@ -362,6 +373,9 @@ cmd_exit =grub_register_command ("exit" , grub_mini_cmd_exit,0 ,"exit from GRUB" ); + cmd_clear = +grub_register_command ("clear" , grub_mini_cmd_clear, +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_clear); }
ChangeLog +4 -0
@@ -1,3 +1,7 @@ +2009-07-23 Joe Auricchio <[email protected]> + + * commands/minicmd.c (grub_mini_cmd_clear): New function. + 2009-07-23 Pavel Roskin <[email protected]> * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
Quoted 7 lines · Joe Auricchio
Quoted 5 lines · Robert Millan
Quoted 3 lines · Joe Auricchio
How's this?
Quoted 7 lines
Quoted 5 lines
The ChangeLog entry is incomplete. It should be e.g.:
*
commands/minicmd.c(grub_mini_cmd_clear): New function.etc. See other entries as an example.
Updated patch attached.
Hi,
The ChangeLog entry is incomplete, it should list the changes in GRUB_MOD_INIT(minicmd) and GRUB_MOD_FINI(minicmd) too.
Btw, your mailer sends text attachments with Content-Type set to application/octet-stream. Please could you adjust it so that it sets it to the standard text/plain MIME type? Otherwise mail clients may fail to recognize it as text, which makes context reply difficult.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Committed with some adjustments to ChangeLog.
Quoted 23 lines · Joe Auricchio
Quoted 10 lines · Robert Millan
Quoted 3 lines · Joe Auricchio
How's this?
The ChangeLog entry is incomplete. It should be e.g.:
*
commands/minicmd.c(grub_mini_cmd_clear): New function.etc. See other entries as an example.
Updated patch attached.
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Quoted 10 lines · Pavel Roskin
Quoted 7 lines · Joe Auricchio
*
commands/minicmd.c: Add clear as alias for cls.My background is in Unix, so 'clear' comes much more naturally to my fingers than 'cls'. But it's bad to clutter grub with too many commands. So I leave this to the maintainers: do we add both commands, only one, or
neither?Let's have "clear" only, as it's more clear :-)
Yes. And GNU systems are our main target, so consistency with them is usually preferrable.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."