mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-10-02 08:51:18 +02:00
fix for completion of string with single quote (11365)
This commit is contained in:
parent
6d4bdb661d
commit
db95186da5
@ -1,5 +1,8 @@
|
||||
2000-05-15 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 11365: Src/Zle/zle_tricky.c: fix for completion of string with
|
||||
single quote
|
||||
|
||||
* 11364: Completion/Core/_path_files, Src/Zle/compmatch.c: fix for
|
||||
suffix-matching; better in-path completion in _path_files
|
||||
|
||||
|
@ -1326,10 +1326,12 @@ get_comp_string(void)
|
||||
autoq = ztrdup(q);
|
||||
}
|
||||
/* While building the quoted form, we also clean up the command line. */
|
||||
for (p = s, tt = qword, i = wb; *p; p++, tt++, i++)
|
||||
for (p = s, tt = qword, i = wb, j = 0; *p; p++, tt++, i++)
|
||||
if (INULL(*p)) {
|
||||
if (i < cs)
|
||||
offs--;
|
||||
if (*p == Snull && isset(RCQUOTES))
|
||||
j = 1-j;
|
||||
if (p[1] || *p != Bnull) {
|
||||
if (*p == Bnull) {
|
||||
*tt = '\\';
|
||||
@ -1356,7 +1358,8 @@ get_comp_string(void)
|
||||
we--;
|
||||
}
|
||||
chuck(p--);
|
||||
}
|
||||
} else if (j && *p == '\'' && i < cs)
|
||||
offs--;
|
||||
|
||||
zsfree(origword);
|
||||
origword = ztrdup(s);
|
||||
|
Loading…
Reference in New Issue
Block a user