Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14248

Re: [PATCH] Add nofirstword completion option

From Luca Boccassi <bluca@debian.org>
Newsgroups gnu.bash.bug
Subject Re: [PATCH] Add nofirstword completion option
Date 2018-06-19 15:27 +0100
Message-ID <mailman.2248.1529418475.1292.bug-bash@gnu.org> (permalink)
References (11 earlier) <e33be886-7975-2e2f-d2d9-a45e24408f72@case.edu> <1528824534.6554.23.camel@debian.org> <c73f2b22-ee77-1ef9-3762-323aa381554e@case.edu> <1528830900.6554.25.camel@debian.org> <dd7d2a46-edb3-dc78-4ac6-84b0e4c849a4@case.edu>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, 2018-06-12 at 15:18 -0400, Chet Ramey wrote:
> On 6/12/18 3:15 PM, Luca Boccassi wrote:
> 
> > In case it can be somewhat useful, once 5.0-beta with the new
> > option is
> > out I'll ask QA at $work to run regressions tests on it and report
> > back
> > in case any issues are found. They have a lot of tests for the
> > command
> > line interface (not just related to completion), so perhaps it
> > could
> > help a little with testing the new version.
> 
> That would be great, thanks.

Hi Chet,

Found another small issue: the INITIALWORD Iflag in complete.def is not
initialised in the compopt_builtin function, which means it sometimes
evaluates to true and spuriously triggers a loookup for the INITIALWORD
completion even though it's not set, printing an error, for example
trying to complete "sh":

$ sh-bash: compopt: _InitialWorD_: no completion specification

The fix is quite simple and it's inlined below.

Thanks!

-- 
Kind regards,
Luca Boccassi

--- a/builtins/complete.def
+++ b/builtins/complete.def
@@ -831,7 +831,7 @@ compopt_builtin (list)
   WORD_LIST *l, *wl;
   COMPSPEC *cs;
 
-  opts_on = opts_off = Eflag = Dflag = 0;
+  opts_on = opts_off = Eflag = Dflag = Iflag= 0;
   ret = EXECUTION_SUCCESS;
 
   reset_internal_getopt ();
-- 
2.17.1

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] Add nofirstword completion option Luca Boccassi <bluca@debian.org> - 2018-06-19 15:27 +0100

csiph-web