New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stash/unstash of $PATH doesn't remove path correctly #45
Comments
It would be great/helpful if you could create a failing test for that (in a PR). But (from only skimming it) it sounds like stashing only supports one level?! |
@blueyed What do you mean by "a failing test"? Something simpler, which can be run by others? |
@dmitry-kabanov |
The problem is that the current dir during the "leave" event is the new dir, and therefore the "unstash" does not find the expected old value (which is based on the directory). However, using |
I have the following bug.
I try to stash two paths to $PATH. I will call them below like this:
code/bin
is my custom path (in the log below it is/home/kabanod/job/ffm/shock-attached/code/bin
)python/bin
is path to python interpreter (in the log below it is/home/kabanod/apps/python/3.4/bin
)What do I do? In
.autoenv.zsh
I prepend$PATH
with the path to thepython/bin
directory using Environment Modules command (module load python/3.4
) and then prepend $PATH withcode/bin
path (usingstash
command). In.autoenv_leave.zsh
I unstash$PATH
from mycode/bin
path and then unloadpython/bin
path.Expected behavior. Both paths are removed from
$PATH
.What happens.
python/bin
path is removed from$PATH
, however, an explicit call tostash
doesn't removecode/bin
path from$PATH
.I also tried to use
autostash
functionality with no success.This is the full log:
The text was updated successfully, but these errors were encountered: