mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-11-22 23:40:58 +02:00
fixup! Only source varstash lib if it's being used
This commit is contained in:
parent
1dd8e8bd46
commit
23dfa33c4e
@ -6,11 +6,22 @@ Setup test environment.
|
|||||||
|
|
||||||
$ mkdir sub
|
$ mkdir sub
|
||||||
$ cd sub
|
$ cd sub
|
||||||
|
|
||||||
|
The varstash library should not get loaded always.
|
||||||
|
|
||||||
|
$ echo 'echo ENTER' > $AUTOENV_FILE_ENTER
|
||||||
|
$ echo 'echo LEAVE' > $AUTOENV_FILE_LEAVE
|
||||||
|
$ test_autoenv_auth_env_files
|
||||||
|
$ cd .
|
||||||
|
ENTER
|
||||||
|
$ type -w autostash
|
||||||
|
autostash: none
|
||||||
|
[1]
|
||||||
|
|
||||||
|
Now on to some stashing.
|
||||||
|
|
||||||
$ echo 'echo ENTER; autostash FOO=changed' > $AUTOENV_FILE_ENTER
|
$ echo 'echo ENTER; autostash FOO=changed' > $AUTOENV_FILE_ENTER
|
||||||
$ echo 'echo LEAVE; autounstash' > $AUTOENV_FILE_LEAVE
|
$ echo 'echo LEAVE; autounstash' > $AUTOENV_FILE_LEAVE
|
||||||
|
|
||||||
Manually create auth file
|
|
||||||
|
|
||||||
$ test_autoenv_auth_env_files
|
$ test_autoenv_auth_env_files
|
||||||
|
|
||||||
Set environment variable.
|
Set environment variable.
|
||||||
@ -19,8 +30,12 @@ Set environment variable.
|
|||||||
|
|
||||||
Activating the env stashes it and applies a new value.
|
Activating the env stashes it and applies a new value.
|
||||||
|
|
||||||
$ cd .
|
$ cd ..
|
||||||
|
LEAVE
|
||||||
|
$ cd sub
|
||||||
ENTER
|
ENTER
|
||||||
|
$ type -w autostash
|
||||||
|
autostash: function
|
||||||
$ echo $FOO
|
$ echo $FOO
|
||||||
changed
|
changed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user