X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/e7b57bc5c5383a6eac9b7d8d0af4f1c63723b948..57d22c7977ad80556aca28496d0192d4a72ef73a:/.zsh/util diff --git a/.zsh/util b/.zsh/util index ed37cb4..422dba9 100644 --- a/.zsh/util +++ b/.zsh/util @@ -16,7 +16,7 @@ array_prepend() { local arrayname="$1"; shift local i for i; do - eval "typeset -ga $arrayname=(\$i \${$arrayname[@]/\$i})" + eval "typeset -ga $arrayname; $arrayname=(\$i \${$arrayname[@]/\$i})" done } @@ -24,7 +24,7 @@ array_append() { local arrayname="$1"; shift local i for i; do - eval "typeset -ga $arrayname=(\${$arrayname[@]/\$i} \$i)" + eval "typeset -ga $arrayname; $arrayname=(\${$arrayname[@]/\$i} \$i)" done }