Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varstash: export the variable for storing stashed vars #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/core/varstash
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
Expand All @@ -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
Expand Down