diff options
| author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-05-21 07:47:34 +0000 |
|---|---|---|
| committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-05-21 07:47:34 +0000 |
| commit | 654c4ab4ffa5f5109d8f167c7908d3d4d5b7aead (patch) | |
| tree | cea849b79099fb08085a432ecf23c03bcfa39075 | |
| parent | fix removal of automatically added specs (from the -- option) for which a use... (diff) | |
| download | zsh-654c4ab4ffa5f5109d8f167c7908d3d4d5b7aead.tar zsh-654c4ab4ffa5f5109d8f167c7908d3d4d5b7aead.tar.gz zsh-654c4ab4ffa5f5109d8f167c7908d3d4d5b7aead.tar.bz2 zsh-654c4ab4ffa5f5109d8f167c7908d3d4d5b7aead.tar.lz zsh-654c4ab4ffa5f5109d8f167c7908d3d4d5b7aead.tar.xz zsh-654c4ab4ffa5f5109d8f167c7908d3d4d5b7aead.tar.zst zsh-654c4ab4ffa5f5109d8f167c7908d3d4d5b7aead.zip | |
fix for completion in nested quotes where the sub-word ends in a backslash (17192)
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | Src/Zle/compcore.c | 8 |
2 files changed, 9 insertions, 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 diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index f618bfd31..851ef0ef5 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -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; |
