1
0
mirror of https://github.com/Tarrasch/zsh-autoenv.git synced 2024-11-25 16:31:00 +02:00

varstash: fix get_autostash_array_name for Zsh 4.3.17 (Travis)

This commit is contained in:
Daniel Hahler 2015-04-23 17:57:46 +02:00
parent 36846ae9b5
commit 248bd5cc0d

View File

@ -193,7 +193,11 @@ function get_autostash_array_name() {
local autostash_name=$(_mangle_var AUTOSTASH)
# Create a scalar variable linked to an array (for exporting).
local autostash_array_name=${(L)autostash_name}
typeset -xT $autostash_name $autostash_array_name
if ! (( ${(P)+autostash_array_name} )); then
# Conditionally set it, to prevent error with Zsh 4.3:
# can't tie already tied scalar: ...
typeset -xT $autostash_name $autostash_array_name
fi
ret=$autostash_array_name
}