xonsh-autoxsh
xonsh-autoxsh copied to clipboard
Add a leave dir option
Is it possible to implement auto command when leave dir too? Just asking for this implementation because for several venvs it would be very helpfull.
@diego-rapoport I've implemented this here: https://github.com/dyuri/xonsh-autoxsh/tree/leave If this is what you wanted I can create a PR, but I think without some kind of parent/children scan this might not be as useful as it seems. For example if you enter a directory, a virtualenv is activated, then you step into a subdirectory of the previous one, and the virtualenv gets deactivated since you left the original directory. But it can print bye pretty well :)
@diego-rapoport I've implemented this here: https://github.com/dyuri/xonsh-autoxsh/tree/leave If this is what you wanted I can create a PR, but I think without some kind of parent/children scan this might not be as useful as it seems. For example if you enter a directory, a virtualenv is activated, then you step into a subdirectory of the previous one, and the virtualenv gets deactivated since you left the original directory. But it can print bye pretty well :)
Thanks for the implementation!! I think that subdirectories could really be a problem, specially if there's a lot of folders inside the project. Solving this you should definately make a PR
@diego-rapoport I've implemented the parent checking on my branch (can be enabled via $AXSH_CHECK_PARENTS
environment variable), please give it a try if you have some time.