Usage case: a git repo for an app contains a .tool-versions file with all the tooling required to the app or to deploy it.
me as a user, or another user might have a preference for additional tooling for this particular project as would rather not have it installed/shimmed as a 'global' but just have it consumed within the repository for the app.
Ideally I am looking for .tool-versions.local where I can add my own tooling alongside the tooling. Is anyone here using a similar workflow, and what is your implementation like?
I've looked into using .envrc and .envrc.local to perform tasks like:
asdf plugin add myplugin
asdf install myplugin latest
asdf local myplugin latest
the problem here is that the last asdf local... will modify the .tool-versions file.
I really want to avoid that
The feature doesn't currently exist within asdf, but you can do it yourself by overriding cd. Plop the following in your
.bashrcor.zshrc.This way,
asdf localshould override.tool-versions.localif it exists. You may want to add this code topushdandpopd, if you use those builtins as well.One downside to this approach is that sometimes, in some situations, for some editors, this code may not be ran when you open a new terminal. For VSCode, you can configure it to do so. Other popular editors should have a similar configuration as well.