From f8455d4ee4ab37f73e30f6cc318223d1c1d5c007 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 23 Apr 2017 21:45:27 +0200 Subject: [PATCH] varstash: export the variable for storing stashed vars --- lib/core/varstash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/varstash b/lib/core/varstash index a12d6fc..38edfcc 100644 --- a/lib/core/varstash +++ b/lib/core/varstash @@ -169,7 +169,7 @@ function stash() { elif [[ $vartype == $pattern" -x"* ]]; then # variable is exported if [[ -z $already_stashed ]]; then - eval "__varstash_export__$stash_name=\"\$$stash_which\"" + eval "export __varstash_export__$stash_name=\"\$$stash_which\"" fi if [[ $stash_which != $stash_expression && -z $_stashing_alias_assign ]]; then eval "export $stash_which=\"$stash_value\"" @@ -195,7 +195,7 @@ function stash() { # (eval):1: command not found: __varstash_nostash___tmp__home_dolszewski_src_smartcd_RANDOM_VARIABLE=1 # fixed in zsh commit 724fd07a67f, version 4.3.14 if [[ -z $already_stashed ]]; then - eval "__varstash_nostash__$stash_name=1" + eval "export __varstash_nostash__$stash_name=1" fi # In the case of a previously unset variable that we're assigning too, export it