From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] Complete 'set root=('
Date: Mon, 07 Jun 2010 22:54:41 +0200 [thread overview]
Message-ID: <4C0D5C91.1010303@gmail.com> (raw)
In-Reply-To: <20100603125556.GT21862@riva.ucam.org>
[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]
Go ahead.
On 06/03/2010 02:55 PM, Colin Watson wrote:
> While reviewing the Texinfo documentation for references to GRUB Legacy
> constructs that needed to be updated, I found some discussion of
> completion that used "root (<TAB>" as an example. For GRUB 2, this
> would need to become "set root=(<TAB>" - but that doesn't work! The
> completion code isn't smart enough to complete only the part after the
> '=' in this case.
>
> What do people think about the following patch, which makes this work so
> that we can document it with a clear conscience?
>
> 2010-06-03 Colin Watson <cjwatson@ubuntu.com>
>
> * normal/completion.c (grub_normal_do_completion): When
> completing arguments to "set" and the current word contains an
> equals sign, skip to after the equals sign before starting
> completion.
>
> === modified file 'normal/completion.c'
> --- normal/completion.c 2010-01-20 08:12:47 +0000
> +++ normal/completion.c 2010-06-03 12:49:47 +0000
> @@ -414,6 +414,14 @@ grub_normal_do_completion (char *buf, in
> else
> current_word = argv[argc - 1];
>
> + if (argc > 1 && ! grub_strcmp (argv[0], "set"))
> + {
> + char *equals = grub_strchr (current_word, '=');
> + if (equals)
> + /* Complete the value of the variable. */
> + current_word = equals + 1;
> + }
> +
> /* Determine the state the command line is in, depending on the
> state, it can be determined how to complete. */
> cmdline_state = get_state (buf);
>
> Thanks,
>
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
prev parent reply other threads:[~2010-06-07 20:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 12:55 [PATCH] Complete 'set root=(' Colin Watson
2010-06-07 20:54 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C0D5C91.1010303@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.