Hi All,
this is a little patch for grub-0.93 to add te following
cmdline features:
- C-g: move backward a word
- C-l: move forward a word
patch looks good to me and works fine too ... but i'm not sure
if these features are really needed.
I need them with long linux kernel boot parameters (for example:
the recent kgdb-overethernet require at least 5 boot parameters)
BTW feedbacks are much appreciated, and if the mantainer would
like to apply this patch i'll be very glad to patch "grub info " too.
so, comon: give me some feedbacks 8))
--- grub-0.93.orig/stage2/char_io.c 2002-12-03 00:49:07.000000000 +0100
+++ grub-0.93/stage2/char_io.c 2003-09-29 21:01:47.000000000 +0200
@@ -649,6 +649,29 @@
if (lpos > 0)
cl_backward (1);
break;
+ case 12: /* C-l forward one word */
+ {
+ int count = 0;
+ while (lpos + count < llen && buf[lpos + count ] == ' ')
+ count ++;
+
+ while (lpos + count < llen && buf[lpos + count ] != ' ')
+ count ++;
+ cl_forward(count);
+ }
+ break;
+ case 7: /* C-g backward one word */
+ {
+ int count;
+ count = (buf[lpos] == 0)? 1: 0;
+ while (lpos - count > 0 && buf[lpos - count] == ' ')
+ count ++;
+
+ while (lpos -count > 0 && buf[lpos - count] != ' ')
+ count ++;
+ cl_backward(count);
+ }
+ break;
case 21: /* C-u kill to beginning of line */
if (lpos == 0)
break;
--
Daniele.
_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub