Tarrasch / zsh-autoenv

Autoenv for zsh
700 stars 30 forks source link

autostash not working when changing out of child directory #77

Closed peterjuras closed 6 years ago

peterjuras commented 6 years ago

autostash appears to not restore/unset environment variables when changing out of a child directory instead of the directory where autostash is part of the .autoenv.zsh file.

Steps to reproduce:

  1. export AUTOENV_LOOK_UPWARDS=1
  2. Create a directory ~/env1
  3. Create ~/env1/.autoenv.zsh with "autostash TEST=YES"
  4. Create a directory ~/env1/env2
  5. Open a new shell starting at ~
  6. cd into ~/env1/env2 -> echo $TEST is now YES
  7. cd into ~ directly

Current behavior

-> echo $TEST is still YES

Expected behavior

-> echo $TEST is empty

blueyed commented 6 years ago

I'm surprised this would not work, but have to investigate.

blueyed commented 6 years ago

Thanks for the report, fixed.

peterjuras commented 6 years ago

Thanks a lot!