Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14854 > unrolled thread
| Started by | Luca Boccassi <bluca@debian.org> |
|---|---|
| First post | 2018-11-26 10:36 +0000 |
| Last post | 2018-11-26 10:36 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] Fix custom program's completions when initial word is set Luca Boccassi <bluca@debian.org> - 2018-11-26 10:36 +0000
| From | Luca Boccassi <bluca@debian.org> |
|---|---|
| Date | 2018-11-26 10:36 +0000 |
| Subject | Re: [PATCH] Fix custom program's completions when initial word is set |
| Message-ID | <mailman.4654.1543228612.1284.bug-bash@gnu.org> |
[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 top | Article view | gnu.bash.bug
csiph-web