1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 21:44:11 +01:00

fix for completion in nested quotes where the sub-word ends in a backslash (17192)

This commit is contained in:
Sven Wischnowsky 2002-05-21 07:47:34 +00:00
parent ba168b43da
commit 654c4ab4ff
2 changed files with 9 additions and 2 deletions

@ -1,5 +1,8 @@
2002-05-21 Sven Wischnowsky <wischnow@zsh.org>
* 17192: Src/Zle/compcore.c: fix for completion in nested
quotes where the sub-word ends in a backslash
* 17191: Completion/Base/Utility/_arguments,
Completion/Unix/Command/_rsync: fix removal of automatically
added specs (from the -- option) for which a user-defined one

@ -1428,8 +1428,8 @@ set_comp_sep(void)
for (p = ns, i = swb; *p; p++, i++) {
if (INULL(*p)) {
if (i < scs) {
if (*p == Bnull && p[1]) {
if (remq)
if (*p == Bnull) {
if (p[1] && remq)
swb -= 2;
if (odq) {
swb--;
@ -1526,6 +1526,10 @@ set_comp_sep(void)
untokenize(ss);
compsuffix = ztrdup(ss);
}
if ((i = strlen(compprefix)) &&
compprefix[i - 1] == '\\' && compprefix[i - 2] != '\\')
compprefix[i - 1] = '\0';
tmp = tricat(compqiprefix, compiprefix, multiquote(qp, 1));
zsfree(compqiprefix);
compqiprefix = tmp;