website/blog/2024-07-07_proto-v0.38.mdx
In this release, we're introducing a long requested feature, shell hooks!
<!--truncate-->You've most likely used another version manager before proto, and may have used a workflow where
PATH was automatically updated with versioned binaries of specific tools, or environment variables
were injected into your shell. This functionality is what's known as shell hooks, and proto now has
experimental support for them through a feature known as
shell activation!
For example, say you're using Zsh as your shell. You could now append the following expression at
the bottom of your shell profile, which evaluates our new
proto activate command.
eval "$(proto activate zsh)"
When the current working directory changes (via cd), or the CLI prompt changes, this activation
workflow will trigger the following:
.prototools configurations up the file system[env] and [tools.*.env]PATH with binary directories for detected toolsPretty awesome right? We think so. But as mentioned above, this feature is highly experimental, and may not work properly across all shells (we're unable to test everything). So if you run into an issue, please report it!
This new workflow unlocks some functionality that was previously not possible with proto shims/bins directly, and they are:
PATH.
Previously, you would need to add them manually. This was non-trivial if they were installed to
versioned locations.PATH. For example,
Rust/Cargo and Python provide a lot of executables that were ignored by our shims.View the official release for a full list of changes.
--include-global flag to proto use, that will also install globally configured tools.