Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Weird tab complete problem with long directory names with a dash and unicode characters



On Tue, 3 Jan 2017 12:57:06 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> The next line is an expansion using $~tmp1 that should just glob.  So
> it's going wrong there --- command line tests seem to confirm this.

Oh, it's that hack for pure strings in a pattern with Meta characters
again (hi from Cambridge).  So it depends on metafication and memory
management and in the affected cases it was only ever working by luck.

Time we got just rid of it completely (bye).

pws

diff --git a/Src/pattern.c b/Src/pattern.c
index 1f2e94b..928790f 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -668,15 +668,9 @@ patcompile(char *exp, int inflags, char **endexp)
 			    if (imeta(*mtest))
 				nmeta++;
 			if (nmeta) {
-			    char *oldpatout = patout;
-			    ptrdiff_t pd;
 			    patadd(NULL, 0, nmeta, 0);
-			    /*
-			     * Yuk.
-			     */
 			    p = (Patprog)patout;
-			    pd = patout - oldpatout;
-			    opnd += pd;
+			    opnd = dupstring_wlen(opnd, oplen);
 			    dst = patout + startoff;
 			}
 



Messages sorted by: Reverse Date, Date, Thread, Author