-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Keep PWD when deactivating venv
on nushell (activate.nu)
#2745
Labels
Comments
venv
on **nushell** [activate.nu]venv
on nushell (activate.nu)
We don't do per shell customization, it's all or nothing. For a change this impactful you'd need CPython venv but in first, so create an issue there. |
CPython's venv doesn't have a nushell activation script, so this is a virtualenv-only feature. But the activation scripts implemented in venv leave the CWD unchanged when deactivating, so I think it makes sense that the nushell script should work the same way. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's the problem this feature will solve?
deactivate
ingvenv
will not change the PWD back to where it wasactivate
dProblem:
Then I remember I had the
venv
fromv1
directory activated, and I dodeactivate
Unexpected behavior: cwd changes to
v1
Expected behavior: I would like to stay in
v2
Describe the solution you'd like
Stay in the current directory
How to solve?
Currently , the activate.nu, has the alias to deactivate, which can be changed to:
overlay hide --keep-env [ PWD ] activate
In that way, cwd stays in
v2
rather thanv1
.Alternative Solutions
Additional context
I like to name all my venvs
venv
becauwe its easy, but i work with multiple a day, so I am constantly switching between them, and I forget todeactivate
it, and thus im constantly having to change back to thecwd
.Tbh, I dont know if this will break for other people so not sure if it needs to be a config or what, but yeah wanted to raise an issue first to see if this is a problem for others, and then maybe add the one liner PR.
The text was updated successfully, but these errors were encountered: