bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH][RFC] forward/backward a word facility


From: Marco Gerards
Subject: Re: [PATCH][RFC] forward/backward a word facility
Date: 29 Sep 2003 22:17:14 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Daniele Bellucci <address@hidden> writes:

> 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

I really like these features, but why don't you use Emacs like key
bindings?  Read "info readline" if you want to know the key binding,
if you don't know this already.

M-b is move backward a word.
M-f is move forward a word.

If you will use C-g and C-l many users will be confused.

Perhaps it isn't possible to use alt in GRUB, is that the problem?  (I
remember something like that, perhaps I'm just confused)

> 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)

I definitely would like more key bindings for GRUB.  Not that my voice
really counts. :)
 
> 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.

Sure, I can read a patch and comment on it.

> --- 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 @@

I always use "diff -u -p".  This makes it easier to read patches
because the name of the function that was changed is shown.  So it
your case that would be:

diff -up grub-0.93.orig/stage2/char_io.c grub-0.93/stage2/char_io.c

>             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);

I assume that you have to follow the GCS for GRUB.  In that case you
will have to add a space, like this:

 +              cl_forward (count);

Perhaps there is more stuff like this in your patch.  Just read the
GCS. :).

I always send in a changelog entry (again, see the GCS ;)).  Changelog
entries can be written best by the person who wrote the patch IMO and
make it easier to read a patch.

But, like I said, I'm not a GRUB hacker; I just want to help a bit. :)

Thanks,
Marco





reply via email to

[Prev in Thread] Current Thread [Next in Thread]