Skip to content

Deactivate or de-init #2743

Answered by native-api
tony-sol asked this question in Q&A
Jul 15, 2023 · 2 comments · 7 replies
Discussion options

You must be logged in to vote

There's no need to "deinit" in the above-described scenario; you only need to replace which with pyenv which to see what real executable would be run.

That's nevertheless possible with a plugin.
Create an executable $PYENV_ROOT/plugins/<plugin-name>/bin/pyenv-sh-deinit.
It will be called when executing pyenv deinit when pyenv is installed as a shell function.
It should output commands to be executed in the current shell. Those need to do the reverse of what pyenv init does as per https://github.com/pyenv/pyenv#advanced-configuration .
It should also handle the --complete argument, printing possible continuations for shell completion (none in this case, most probably).

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@tony-sol
Comment options

Comment options

You must be logged in to vote
6 replies
@tony-sol
Comment options

@native-api
Comment options

@tony-sol
Comment options

@native-api
Comment options

Answer selected by tony-sol
@tony-sol
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants