Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14854
| Path | csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Luca Boccassi <bluca@debian.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: [PATCH] Fix custom program's completions when initial word is set |
| Date | Mon, 26 Nov 2018 10:36:41 +0000 |
| Lines | 65 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.4654.1543228612.1284.bug-bash@gnu.org> (permalink) |
| References | <20181123124854.4208-1-bluca@debian.org> <20181125100418.GB3300@conan.hallows> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-zMv89DmcPjrVubeU8LxX" |
| X-Trace | usenet.stanford.edu 1543228612 28189 208.118.235.17 (26 Nov 2018 10:36:52 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash@gnu.org |
| To | Tom Ryder <tom@sanctum.geek.nz> |
| 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:cc:date:in-reply-to :references:mime-version; bh=Q9Lk8Ejm+qjvNgymkuTicCRkzMef1O8u3QZRSmAW/ww=; b=r44pXCSer+YOrs2UyAPYSzZbGpFhtHdlhNwMBzS1xSNfScEalabhcoQIoyZ3Yc+nLE fQmLdlu5mXpQKgc3+vvpDmKMTwZz/MBpfqfl7/LkRLHWQl6Rh2QSYaXqvdJj68wTHyYK cLHeXEylIAhulSftNKxF9M5tjxmnjLxhUHp+lVniLa4Fck1lNExnvzkhc+a2uwPoIbwy 42UMyvOXwJFM3bm6Bjt2Oj1R7ZVi6JPCJL3RYRdDKrw74K1Wo+EoSNYFRdZwR2yMaXqT MYcMAVoVE6lUiQmmTuxEGIb2iYdK9emoll/TDQAZdV0pyyJwxQ/3xGk7LGWXk7S5RuG8 RlhQ== |
| X-Gm-Message-State | AA+aEWZflAmYx8wNOgsMiS33YYtj9rggBdEZRI+wEQR6mBIqlpnppGhV M9Byvacs1Yv+Y+ovIJwQ52Y= |
| X-Google-Smtp-Source | AFSGD/WGtT3GEtMgNigBJ6V/0xBmZM8Z7yyLuB/fHDDCOzHah6DUQMq1BmdDEqwXihcmki2w0FsEGA== |
| X-Received | by 2002:adf:91a3:: with SMTP id 32mr21012623wri.99.1543228604538; Mon, 26 Nov 2018 02:36:44 -0800 (PST) |
| In-Reply-To | <20181125100418.GB3300@conan.hallows> |
| 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 | 209.85.221.68 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:14854 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Sun, 2018-11-25 at 23:04 +1300, Tom Ryder wrote:
> On Fri, Nov 23, 2018 at 12:48:54PM +0000, Luca Boccassi wrote:
> > The fix is to only override foundcs if both iw_compspec is not null
> > and we are not in command position.
>
> Thank you for this patch. I first ran into the issue with 5.0-beta2
> another way: I noticed that my default completion spec with -D as
> suggested by the Bash manual page was no longer working:
>
> _completion_loader()
> {
> . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return
> 124
> }
> complete -D -F _completion_loader -o bashdefault -o default
>
> In 5.0-beta2, after running this code, for any command with no
> completion specs defined in /etc/bash_completion.d, completing an
> argument does nothing.
>
> Your second patch does not correct that, but it looks like that's
> because a non-zero `foundcs` is coerced to 1 in it, when there are
> other
> meaningful values for the integer as the first parameter for
> `pcomp_set_readline_variables(int, int)`.
>
> The attached patch is my own attempt, which seems to correct my
> issues
> as well as the one you raised in this post. Long-time user, first-
> time
> poster...
Hi,
Thanks for the update, yes it looks like your patch is a better
solution, I've tested it as well, thanks.
--
Kind regards,
Luca Boccassi
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: [PATCH] Fix custom program's completions when initial word is set Luca Boccassi <bluca@debian.org> - 2018-11-26 10:36 +0000
csiph-web