From db95186da5a7d0057fa69cfb9393210751ab2cb2 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 15 May 2000 09:54:46 +0000 Subject: fix for completion of string with single quote (11365) --- ChangeLog | 3 +++ Src/Zle/zle_tricky.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0dc4e9548..3c450bb5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-05-15 Sven Wischnowsky + * 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 diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 8accf52fb..f516fe211 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -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); -- cgit 1.4.1