Documentation is currently for moon v2 and latest proto. Documentation for moon v1 has been frozen and can be found here.
deactivate
The proto deactivate <shell> command will deactivate proto for the current shell session, by
reverting everything that a previous activation applied. This unsets environment
variables, removes shell aliases, and removes the PATH entries that were injected.
$ proto deactivate
Do not call this command directly, prefer calling the proto_deactivate shell function that the activation hook defines, as it also
unregisters the hook itself, and removes both functions. Learn more about
shell activation in the official workflow documentation!
Arguments
<shell>- The shell to deactivate for. Is detected if not provided.
Options
--export- Print the deactivate instructions in shell-specific syntax.--json- Print the deactivate instructions in JSON format.
Caveats
- Everything that must be reverted is tracked by the activation itself (through the
_PROTO_ACTIVATED_ENV,_PROTO_ACTIVATED_ALIASES, and_PROTO_ACTIVATED_PATHvariables), so configuration files and tool plugins are never loaded. Deactivating is cheap, and works even when the current directory would fail to load. PATHentries that were inherited from outside of the activation are not removed. If your shell profile already prepended~/.proto/shimsor~/.proto/bin, they'll remain after deactivating.- In Nu, the teardown is staged like every other statement, so it applies on the trigger that follows the call, instead of immediately.
Re-activating
Deactivation is not permanent. To activate again within the same session, simply evaluate
proto activate once more.
$ eval "$(proto activate zsh)"