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

Re: zsh 4.3.3 released



On Mon, Apr 16, 2007 at 05:47:02PM +0100, Peter Stephenson wrote:
> I've uploaded version 4.3.3 of zsh to ftp.zsh.org.

I just tested out the latest CVS version, and found that I get an error
using the smart-insert-last-word function:

smart-insert-last-word:108: bad math expression: operator expected at `Account fo...'

The attached patch fixes this for me.  Was it ever possible to infix a
comment inside a math expression?

..wayne..
--- Functions/Zle/smart-insert-last-word	26 Feb 2007 07:43:39 -0000	1.3
+++ Functions/Zle/smart-insert-last-word	17 Apr 2007 18:06:36 -0000
@@ -104,8 +104,8 @@ fi
               found=$lastcmd[(I)$pattern]
           done
       fi
-      (( found-- > 0 &&            # Account for 1-based index
-        (numeric = $#lastcmd - found) ))
+      # The following will account for 1-based index
+      (( found-- > 0 && (numeric = $#lastcmd - found) ))
   fi
 } always {
   HISTNO=$_ilw_hist                # Return to current command


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