https://github.com/zimfw/asdf
Sets up asdf, with auto install and optimized usage of the direnv plugin.
https://github.com/zimfw/asdf
asdf zim zimfw zsh zsh-plugin zsh-plugins
Last synced: 7 months ago
JSON representation
Sets up asdf, with auto install and optimized usage of the direnv plugin.
- Host: GitHub
- URL: https://github.com/zimfw/asdf
- Owner: zimfw
- License: mit
- Created: 2021-08-07T03:25:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-05T03:50:39.000Z (about 1 year ago)
- Last Synced: 2025-04-13T12:13:02.942Z (7 months ago)
- Topics: asdf, zim, zimfw, zsh, zsh-plugin, zsh-plugins
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 11
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - asdf (zimfw) - Initializes [asdf](https://github.com/asdf-vm/asdf), installing it using `git` if not installed yet. Also, bypasses the shims if you're using the [direnv](https://github.com/asdf-community/asdf-direnv) plugin, as suggested by the plugin [pro-tips](https://github.com/asdf-community/asdf-direnv/#pro-tips). (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - asdf (zimfw) - Initializes <b><code> 24621⭐</code></b> <b><code> 904🍴</code></b> [asdf](https://github.com/asdf-vm/asdf)), installing it using `git` if not installed yet. Also, bypasses the shims if you're using the <b><code> 575⭐</code></b> <b><code> 42🍴</code></b> [direnv](https://github.com/asdf-community/asdf-direnv)) plugin, as suggested by the plugin <b><code> ?⭐</code></b> <b><code> ?🍴</code></b> [pro-tips](https://github.com/asdf-community/asdf-direnv/#pro-tips)). (Plugins / ZSH on Windows)
README
asdf
====
Initializes [asdf], installing it using git if not installed yet. Also, bypasses
the shims if you're using the [direnv plugin], as suggested by the plugin
[pro-tips].
Settings
--------
The path of `ASDF_DIR`, where asdf is installed, is checked among the usual
directories created by Homebrew or Pacman, or the default `${HOME}/.asdf`. You
can define `ASDF_DIR` in your .zshrc before initializing this module to customize
its path:
ASDF_DIR=/path/to/asdf_dir
FAQ
---
### Do do I install the [direnv plugin] to work with this module?
1. Run these commands:
```
asdf plugin-add direnv
asdf direnv setup --no-touch-rc-file --version latest
```
2. Make sure your .zshrc does not contain the following line:
```
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
```
### How to configure asdf to work with the direnv installed with my system package manager?
To use your system's direnv instead of direnv installed via asdf, follow these
steps:
1. Keep the asdf direnv plugin installed. You can install it with:
```
asdf plugin-add direnv
```
2. Uninstall any direnv installed with asdf:
```
asdf uninstall direnv
```
3. Make sure the ~/.config/direnv/lib/use_asdf.sh script exists. You can
generate it with:
```
asdf direnv setup --no-touch-rc-file --version system
```
4. Make sure your direnv .envrc files have `use asdf`.
5. Remove `zmodule asdf` from .zimrc or any asdf initialization from .zshrc.
6. Make sure you're initializing direnv during shell start-up, preferably with
`zmodule dirvenv` in your .zimrc.
Basically you're using direnv to activate asdf this way. Since you're using the
system's direnv, that does not depend on asdf to work, it's a much simpler setup.
[asdf]: https://github.com/asdf-vm/asdf
[direnv plugin]: https://github.com/asdf-community/asdf-direnv
[pro-tips]: https://github.com/asdf-community/asdf-direnv/blob/master/README.md#pro-tips