From 248bd5cc0df275c2639097438c156a27ebda91a2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 23 Apr 2015 17:57:46 +0200 Subject: [PATCH] varstash: fix get_autostash_array_name for Zsh 4.3.17 (Travis) --- lib/varstash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/varstash b/lib/varstash index a36ed2e..26b2e72 100644 --- a/lib/varstash +++ b/lib/varstash @@ -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 }