From 575cada5e96ab77c6b9a9d84403120b49dac617e Mon Sep 17 00:00:00 2001 From: rupa Date: Thu, 12 Dec 2013 20:01:41 -0500 Subject: [PATCH] Different syntax for setting zsh precmd Old versions of bash choke on the += syntax, even though it's in a chunk of code for another shell. Closes #122 - h/t @atannen. --- z.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/z.sh b/z.sh index 8fd7f0a..786bdfd 100644 --- a/z.sh +++ b/z.sh @@ -219,7 +219,7 @@ if compctl >/dev/null 2>&1; then } fi [[ -n "${precmd_functions[(r)_z_precmd]}" ]] || { - precmd_functions+=(_z_precmd) + precmd_functions[$(($#precmd_functions+1))]=_z_precmd } } _z_zsh_tab_completion() {