]> git.donarmstrong.com Git - zsh.git/commitdiff
pass arguments to hook functions
authormartin f. krafft <madduck@madduck.net>
Tue, 6 May 2008 10:34:06 +0000 (11:34 +0100)
committermartin f. krafft <madduck@madduck.net>
Tue, 6 May 2008 10:34:06 +0000 (11:34 +0100)
.zsh/zshrc/99_hook_functions

index afd992bc36e07a75be6465bf3e940f7b351be396..a934d04f2231846704d83fcdf84522de284d7d5e 100644 (file)
 
 autoload -U is-at-least
 if ! is-at-least 4.3.6; then
-  precmd() { for fn ($precmd_functions) $fn }
-  preexec() { for fn ($preexec_functions) $fn }
-  chpwd() { for fn ($chpwd_functions) $fn }
-  periodic() { for fn ($periodic_functions) $fn }
+  precmd() { for fn ($precmd_functions) $fn "$@" }
+  preexec() { for fn ($preexec_functions) $fn "$@" }
+  chpwd() { for fn ($chpwd_functions) $fn "$@" }
+  periodic() { for fn ($periodic_functions) $fn "$@" }
 fi
 
 # vim:ft=zsh