Skip to content
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

Add a leave dir option #10

Open
diego-rapoport opened this issue Jul 6, 2021 · 3 comments · May be fixed by #11
Open

Add a leave dir option #10

diego-rapoport opened this issue Jul 6, 2021 · 3 comments · May be fixed by #11

Comments

@diego-rapoport
Copy link

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.

@dyuri
Copy link

dyuri commented Jul 10, 2021

@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
Copy link
Author

@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

@dyuri
Copy link

dyuri commented Jul 17, 2021

@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.

@dyuri dyuri linked a pull request Aug 2, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants