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

Re: loving zsh, crashing zsh...




On 15.08.2009, at 18:38, Peter Stephenson wrote:
Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.99
diff -u -r1.99 zle_tricky.c
--- Src/Zle/zle_tricky.c	20 Feb 2009 21:49:58 -0000	1.99
+++ Src/Zle/zle_tricky.c	15 Aug 2009 16:25:16 -0000
@@ -1211,7 +1211,15 @@
	    (ins == 2 && i == 2) || (ins == 3 && i == 3) ||
	    tok == BAR    || tok == AMPER     ||
	    tok == BARAMP || tok == AMPERBANG ||
-	    ((tok == DBAR || tok == DAMPER) && !incond)) {
+	    ((tok == DBAR || tok == DAMPER) && !incond) ||
+	    /*
+	     * Special case: we might reach a new command (incmdpos set)
+	     * if we've already found the string we're completing (tt set)
+	     * without hitting one of the above if we're using one of
+	     * the special zsh forms of delimiting for conditions and
+	     * loops that I really loathe having to support.

Is it the "alternate forms for complex commands" you are refering to here?

In the manual it says:

"Many of zshâs complex commands have alternate forms. These particular versions of complex commands should be conâ sidered deprecated and may be removed in the future. The versions in the previous section should be preferred
      instead."

When will they finally go away or be disabled by default? I once converted all my scripts and functions to use these alternate forms, because I thought it would be good. Later I read this paragraph in the manual and realized it is not good to change the well established shell syntax in such a massive way. I then reverted all the changes I made to my stuff. (As a side effect non-zsh users are now able to understand my scripts.)


Sebastian


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