Closed dmatos2012 closed 2 months ago
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.
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.