mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-12-22 02:40:16 +02:00
lib/varstash: fix handling of exported vars with Zsh 5.3+
Upstream PR: https://github.com/cxreg/smartcd/pull/51
This commit is contained in:
parent
3fc024eced
commit
c018ad8e66
@ -146,7 +146,8 @@ function stash() {
|
||||
eval "__varstash_array__$stash_name=(\"\${$stash_which""[@]}\")"
|
||||
fi
|
||||
|
||||
elif [[ $vartype == $pattern" -x"* ]]; then
|
||||
elif ([[ -n $ZSH_VERSION ]] && [[ $vartype == "export "* ]]) \
|
||||
|| [[ $vartype == $pattern" -x"* ]]; then
|
||||
# variable is exported
|
||||
if [[ -z $already_stashed ]]; then
|
||||
eval "export __varstash_export__$stash_name=\"\$$stash_which\""
|
||||
|
Loading…
Reference in New Issue
Block a user