]> Sergey Matveev's repositories - zsh-autoenv.git/commitdiff
varstash: fix pattern in stash
authorDaniel Hahler <git@thequod.de>
Thu, 18 Dec 2014 19:36:54 +0000 (20:36 +0100)
committerDaniel Hahler <git@thequod.de>
Thu, 18 Dec 2014 19:36:54 +0000 (20:36 +0100)
lib/varstash

index d5016c1aef64e8df5c56bb48061d5b492b4538b0..eae62b37836248dba62678578af18b474906b805 100644 (file)
@@ -175,9 +175,9 @@ function stash() {
         local vartype="$(declare -p $stash_which 2>/dev/null)"
         if [[ -n $vartype ]]; then
             if [[ -n $ZSH_VERSION ]]; then
-                local pattern="^typeset"
+                local pattern="typeset"
             else
-                local pattern="^declare"
+                local pattern="declare"
             fi
             if [[ $vartype == $pattern" -a"* ]]; then
                 # varible is an array