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

Re: yet another undesired 3.1.5-pws-15 change



Timothy J Luoma wrote:

> 3.1.5-pws-15
> 
> #cd $la[tab] gives me
> 
> # cd $lapps[spacehere][cursor here]
> 
> how can I get the 3.1.4 behavior back?

By applying the patch below.

> ps -- there seem to be a LOT of these types of changes in 3.1.5....

Please name them, because...

> I wish  
> there were more consideration given to keeping things consistent for those  
> who upgrade... changing the way things behave and making the user reconfigure  
> everything is not a good thing...

...of course, we (w.r.t. the completion code: I) tried to keep the old
behavior, but there were a lot of changes in the code needed for the
new features (and there are many of them) and so I didn't manage to do
so in some cases.

Again: if you find things that behave differently now, and if the
change isn't a good thing, please let us know and I'll attempt to fix
it.


As for your other message: I need some more help here since I can't
reproduce it. Can you complete the names that don't appear in the
list? By giving an unambiguous prefix? Only with menucompletion? This
is NextStep (right?): did you get any compiler warnings in
Zle/zle_tricky.c? (Weird question, but I have no idea how what you
described can happen...)


The patch: it's do_single() again, failing to build the expanded path
for the parameter just completed.

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Tue Apr 13 10:32:15 1999
+++ Src/Zle/zle_tricky.c	Fri Apr 23 12:45:52 1999
@@ -6970,10 +6976,20 @@
 		t = 1;
 	    else {
 		/* Build the path name. */
-		p = (char *) zhalloc(strlen(prpre) + strlen(str) +
-				 strlen(psuf) + 3);
-		sprintf(p, "%s%s%s", (prpre && *prpre) ? prpre : "./", str, psuf);
+		if (m->ripre && !*psuf) {
+		    int ne = noerrs;
 
+		    p = (char *) zhalloc(strlen(m->ripre) + strlen(str) + 1);
+		    sprintf(p, "%s%s", m->ripre, str);
+		    noerrs = 1;
+		    parsestr(p);
+		    singsub(&p);
+		    noerrs = ne;
+		} else {
+		    p = (char *) zhalloc(strlen(prpre) + strlen(str) +
+				 strlen(psuf) + 3);
+		    sprintf(p, "%s%s%s", (prpre && *prpre) ? prpre : "./", str, psuf);
+		}
 		/* And do the stat. */
 		t = (!(sr = ztat(p, &buf, 0)) && S_ISDIR(buf.st_mode));
 	    }

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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