Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug with completion in quotes
On Oct 12, 12:37am, Oliver Kiddle wrote:
} Subject: bug with completion in quotes
}
} % : $'<tab>x
} utils.c:5893: BUG: unterminated $' substitution
Hrm. Comments say:
* ... If both GETKEY_DOLLAR_QUOTE
* and GETKEY_UPDATE_OFFSET are present in "how", the string is not
* expected to be terminated (this is used in completion to parse
* a partial $'...'-quoted string) and the length passed back is
* that of the converted string.
And later, right at the point of that DPUTS:
* When called from completion, where we use GETKEY_UPDATE_OFFSET to
* update the index into the metafied editor line, we don't necessarily
* have the end of a $'...' quotation, else we should do.
However, as far as I can tell nothing ever passes GETKEY_UPDATE_OFFSET
in any circumstances, completion or otherwise.
Adding that flag to the call near zle_tricky.c:1733 silences this warning,
but that can't be correct as GETKEY_UPDATE_OFFSET expects to deref the
"misc" parameter which is NULL in that call.
There are also places in utils.c where comments appear to mean that
GETKEY_UPDATE_OFFSET tests need to be added, but there are none. I
think we've uncovered someone's unfinshed work.
} % : $'<tab>x'
} zle_tricky.c:666: BUG: 0 <= wb <= zlemetacs <= we is not true!
Examining in the debugger we have
(gdb) p wb
$2 = 2
(gdb) p zlemetacs
$3 = 1
(gdb) p we
$4 = 3
I think this is an off-by-one error happening because dollar-tick is
two characters being treated as a solitary quote, but I don't know
where to fix it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author