Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Luca Boccassi Newsgroups: gnu.bash.bug Subject: Re: [PATCH] Add nofirstword completion option Date: Tue, 19 Jun 2018 15:27:43 +0100 Lines: 70 Approved: bug-bash@gnu.org Message-ID: References: <20180518110611.5099-1-bluca@debian.org> <96bcb197-40d1-aac8-c214-c513a6db805d@case.edu> <1527068652.6997.5.camel@debian.org> <76b1d3fa-4cb1-3e70-d93c-ada07c04dfa2@case.edu> <1527082457.6997.14.camel@debian.org> <4ccfc554-15a9-2ec1-55e1-b2df687f0bee@case.edu> <1527270167.6997.22.camel@debian.org> <3a98f6c5-0f1e-54aa-491c-da7100430ce8@case.edu> <1527605096.6997.27.camel@debian.org> <1527860403.6997.72.camel@debian.org> <1528468856.6554.6.camel@debian.org> <1528824534.6554.23.camel@debian.org> <1528830900.6554.25.camel@debian.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-c8QUAIQHq1fJIYzCpQI4" X-Trace: usenet.stanford.edu 1529418475 31141 208.118.235.17 (19 Jun 2018 14:27:55 GMT) X-Complaints-To: action@cs.stanford.edu To: chet.ramey@case.edu, bug-bash@gnu.org Envelope-to: bug-bash@gnu.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:mime-version; bh=LZeQqc4G3IoTiovFioF0yVhSgYR1DxQytRyS+mXt8Ug=; b=LNn5bvLQb8bPFaseu4ZuwITAcwFEvZv/rq+qZSF2OkIgFtr8pleeW/6BEHJ0/r4x18 t/oP1JoOWJ5vHfyGyNFPAtA8UByne5LaeiCxCutNqcCrB7FbmdKkkEOdE+PbVICai55U 3b1AdVeVDt27X5HQY9WGr3nWXa2iGwbU96/JS0utUM+6qABBO+RwqVbEI6/47SHuexEp EoA6q6IpBZ+B0VAYV+xEpBY1MzaNhNOTK5uolOZWeT4lDq5N+BUpPRYDZAVKXzQyyOXe 83FGbZ4kJqKI9HdumBFyvuv/G+U56TKGzOI7Q4vn1R45vyBU94xAo0v+Lc0B6wUW6Hlj QSsQ== X-Gm-Message-State: APt69E1mZZ+GCyXFI5v4SLqfS+/iep3y53tmBmNWbdq4USGDKYZBoBLi Gh5otYfsQHg+tFqqItMunf8= X-Google-Smtp-Source: ADUXVKJ2r31uA5xYDuWLR4IIUAZMcCRHbewJVBuLKqQzXnPQLuYdgUwQOLXM7o7Q2TnFCJmx89xk1Q== X-Received: by 2002:a1c:92ce:: with SMTP id u197-v6mr12570900wmd.120.1529418467461; Tue, 19 Jun 2018 07:27:47 -0700 (PDT) In-Reply-To: X-Mailer: Evolution 3.22.6-1+deb9u1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.65 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14248 --=-c8QUAIQHq1fJIYzCpQI4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2018-06-12 at 15:18 -0400, Chet Ramey wrote: > On 6/12/18 3:15 PM, Luca Boccassi wrote: >=20 > > 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. >=20 > 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! --=20 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; =20 - opts_on =3D opts_off =3D Eflag =3D Dflag =3D 0; + opts_on =3D opts_off =3D Eflag =3D Dflag =3D Iflag=3D 0; ret =3D EXECUTION_SUCCESS; =20 reset_internal_getopt (); --=20 2.17.1 --=-c8QUAIQHq1fJIYzCpQI4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE6g0RLAGYhL9yp9G8SylmgFB4UWIFAlspEt8ACgkQSylmgFB4 UWKXYQf8CH0S2lSgCLDc0hzS3xpjfmbsEg2SIpI/bbodTSaVzZi1lgkZWPv/2GCE bSjF0uhvIG19WCIthlJ69SDxzNvJgur/mHssON6j5IFblaS0hVFI5we9pKecSGJZ HM5pg7kgYvohKC6ZbBU/xu0oHqXid0a21JdYXXqdI0wlOaTw5TAem4+2OJlNFLkv Nl9Tca7+GcdCeIlI75vx1v2UIUUGhwPoznbGtW4W2ir/VWR1SgLMxgipbzOEU36w echBeRChtfetz9cPK6RGs+djq/NuWakkzfZo3oNixgas8FfZcXJhSR7Btj3HkTcm /CL2r/qWqcfKdvEy42yiotRJFJ61Zg== =fe1n -----END PGP SIGNATURE----- --=-c8QUAIQHq1fJIYzCpQI4--