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

Re: zsh 4.3.4 released



On Thu, Apr 19, 2007 at 12:07:58PM +0100, Peter Stephenson wrote:
> 	* unposted: Functions/Misc/add-zsh-hook: should have been
> 	added ages ago but wasn't.

I've encountered a wee problem with this, and I do mean wee -- the time it
took me to spot this proves my font is too small for my powers of vision.

$ zsh-4.3.4-dev-0 -f
% zcompile -z share/zsh/4.3.4-dev-0/functions/add-zsh-hook
zsh: parse error near `else'
zcompile: can't read file: share/zsh/4.3.4-dev-0/functions/add-zsh-hook

This fixes it:

--- Functions/Misc/add-zsh-hook 19 Apr 2007 09:40:56 -0000      1.1
+++ Functions/Misc/add-zsh-hook 19 Apr 2007 19:24:23 -0000
@@ -52,7 +52,7 @@
     (( ${(P)#hook} )) || unset $hook
   fi
 else
-  if (( ${(P)+hook} )): then
+  if (( ${(P)+hook} )); then
     if (( ${(P)hook[(I)$fn]} == 0 )); then
       set -A $hook ${(P)hook} $fn
     fi



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