From: Colin Watson Date: Mon, 7 Jun 2010 21:13:26 +0000 (+0100) Subject: * normal/completion.c (grub_normal_do_completion): When completing X-Git-Tag: 1.99~839 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb55c3acf9adec8a576e35551a8d2f5d6684cb88;p=thirdparty%2Fgrub.git * 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. --- diff --git a/ChangeLog b/ChangeLog index b8f5f80d8..bc1b2686a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-06-07 Colin Watson + + * 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. + 2010-06-07 Colin Watson * fs/i386/pc/pxe.c (grub_pxe_open): Fix parsing of gateway_ip. diff --git a/normal/completion.c b/normal/completion.c index 13e8f7a6b..334eaea11 100644 --- a/normal/completion.c +++ b/normal/completion.c @@ -414,6 +414,14 @@ grub_normal_do_completion (char *buf, int *restore, 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);