1
0
mirror of https://github.com/Tarrasch/zsh-autoenv.git synced 2025-12-14 02:15:11 +02:00

Cleanup API/vars for enter/leave events

The variables are local now, which makes them being handled correctly
when calling `autoenv_source_parent`.
Without this, a call to `autoenv_source_parent` overwrites the values in
the current scope.
This commit is contained in:
Daniel Hahler
2015-10-09 22:04:55 +02:00
parent 58268b8da3
commit 961190678e
4 changed files with 58 additions and 23 deletions

View File

@@ -33,8 +33,9 @@ test_autoenv_add_to_env() {
# Add enter and leave env files to authentication file.
test_autoenv_auth_env_files() {
test_autoenv_add_to_env $PWD/$AUTOENV_FILE_ENTER
test_autoenv_add_to_env $PWD/$AUTOENV_FILE_LEAVE
local dir=${1:-$PWD}
test_autoenv_add_to_env $dir/$AUTOENV_FILE_ENTER
test_autoenv_add_to_env $dir/$AUTOENV_FILE_LEAVE
}
# Now keep on going on errors again.