Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug with completion in quotes

On Sun, 12 Oct 2014 11:29:43 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> On Oct 12,  6:51pm, Peter Stephenson wrote:
> }
> } Although that function is a permanent black stain on my soul, before I
> } send others on wild goose chases I don't think it can be the culprit
> } here since I think it's *only* used for recursive quotes.  I'm now
> } wondering about get_comp_string() from line 1676 in zle_tricky.c,
> } including the grumpy comment I would guess is from me, since they usually
> } are, around line 1686.  However, I haven't gone into the nitty gritty.
> It's definitely get_comp_string(), probably via getkeystring() in utils.c
> See my earlier email.

I think this is zsh-workers/23809, commit
e0a3e74b15fd39b21ef1770e67e2f005321b5fb9, going off at the wrong time.
It was supposed to apply to expanding complete $'...' expressions, but
in this case it's being applied to an uncompleted completion.

It looks like the intended purpose is basically OK since completing
after a $'...' works OK, at least in simple cases.  So it may be we
simply need to skip the code added by that change --- simply setting
skipchars to 2 instead looks like it's probably the right thing to do
--- if we're in the middle of it.

I think this is roughly what the "i + (pe - p) < zlemetacs" test is
trying to do at line 1721.  Evidently it's not working.  Presumably one
of the many ad hoc offsets hasn't been taken account of.


Messages sorted by: Reverse Date, Date, Thread, Author