mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-28 07:50:09 +08:00
Add 'asdf' plugin
This commit is contained in:
parent
b4a85eca9d
commit
616ac67924
27
plugins/asdf/README.md
Normal file
27
plugins/asdf/README.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
## asdf
|
||||||
|
|
||||||
|
**Maintainer:** [@RobLoach](https://github.com/RobLoach)
|
||||||
|
|
||||||
|
Adds integration with [asdf](https://github.com/asdf-vm/asdf), the extendable version manager, with support for Ruby, Node.js, Elixir, Erlang and more.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
1. Enable the plugin by adding it to your `plugins` definition in `~/.zshrc`.
|
||||||
|
|
||||||
|
```
|
||||||
|
plugins=(asdf)
|
||||||
|
```
|
||||||
|
|
||||||
|
2. [Install asdf](https://github.com/asdf-vm/asdf#setup) by running the following:
|
||||||
|
```
|
||||||
|
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
See the [asdf usage documentation](https://github.com/asdf-vm/asdf#usage) for information on how to use asdf:
|
||||||
|
|
||||||
|
```
|
||||||
|
asdf plugin-add nodejs git@github.com:asdf-vm/asdf-nodejs.git
|
||||||
|
asdf install nodejs 5.9.1
|
||||||
|
```
|
7
plugins/asdf/asdf.plugin.zsh
Normal file
7
plugins/asdf/asdf.plugin.zsh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Find where asdf should be installed.
|
||||||
|
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
|
||||||
|
|
||||||
|
# Load asdf, if found.
|
||||||
|
if [ -f $ASDF_DIR/asdf.sh ]; then
|
||||||
|
. $ASDF_DIR/asdf.sh
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user