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

Fix (auto)unstashing when being sourced from a subdir (#79)

Fixes https://github.com/Tarrasch/zsh-autoenv/issues/77.
This commit is contained in:
Daniel Hahler
2017-12-14 00:53:25 +01:00
committed by GitHub
parent 9074633a29
commit d6bfdff968
2 changed files with 5 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ Test unstash behavior on leaving.
Setup test environment.
$ mkdir sub
$ mkdir -p sub/sub2
$ echo 'echo ENTER; stash FOO=changed' >| sub/$AUTOENV_FILE_ENTER
$ echo 'echo LEAVE; unstash FOO' >| sub/$AUTOENV_FILE_LEAVE
$ test_autoenv_auth_env_files sub
@@ -12,14 +12,14 @@ Setup test environment.
Activating the env stashes it and applies a new value.
$ cd sub
$ cd sub/sub2
ENTER
$ echo $FOO
changed
Leaving the directory unstashes it (varstash_dir is set to prev dir).
$ cd ..
$ cd -
LEAVE
$ echo $FOO
orig