From 562346843ee20906857cf9f9b299871bad8b0def Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 4 Aug 1999 15:25:56 +0000 Subject: zsh-workers:7355 --- Src/Zle/compctl.c | 7 +++++-- Src/Zle/zle_tricky.c | 11 ++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index a8a864a1a..824f84a64 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -1888,7 +1888,7 @@ ignore_prefix(int l) char *tmp, sav = compprefix[l]; compprefix[l] = '\0'; - tmp = tricat(compiprefix, rembslash(compprefix), ""); + tmp = tricat(compiprefix, compprefix, ""); zsfree(compiprefix); compiprefix = tmp; compprefix[l] = sav; @@ -1903,7 +1903,7 @@ ignore_suffix(int l) char *tmp, sav; l = strlen(compsuffix) - l; - tmp = tricat(rembslash(compsuffix + l), compisuffix, ""); + tmp = tricat(compsuffix + l, compisuffix, ""); zsfree(compisuffix); compisuffix = tmp; sav = compsuffix[l]; @@ -2126,9 +2126,11 @@ bin_compset(char *name, char **argv, char *ops, int func) case CVT_RANGEPAT: tokenize(sa); sa = rembslash(sa); + remnulargs(sa); if (sb) { tokenize(sb); sb = rembslash(sb); + remnulargs(sb); } break; case CVT_PRENUM: @@ -2144,6 +2146,7 @@ bin_compset(char *name, char **argv, char *ops, int func) na = -1; tokenize(sa); sa = rembslash(sa); + remnulargs(sa); break; } return !do_comp_vars(test, na, sa, nb, sb, 1); diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index a9a9b9196..f5d595607 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -3811,13 +3811,8 @@ addmatches(Cadata dat, char **argv) /* Get the contents of the completion variables if we have * to perform matching. */ if (dat->aflags & CAF_MATCH) { - if (dat->aflags & CAF_QUOTE) { - lipre = dupstring(compiprefix); - lisuf = dupstring(compisuffix); - } else { - lipre = quotename(compiprefix, NULL); - lisuf = quotename(compisuffix, NULL); - } + lipre = dupstring(compiprefix); + lisuf = dupstring(compisuffix); lpre = dupstring(compprefix); lsuf = dupstring(compsuffix); llpl = strlen(lpre); @@ -5030,8 +5025,6 @@ comp_str(int *ipl, int *pl, int untok) remnulargs(p); ctokenize(s); remnulargs(s); - ctokenize(ip); - remnulargs(ip); } lp = strlen(p); ls = strlen(s); -- cgit 1.4.1