|
| 1 | +## Install asdf-vm |
| 2 | + |
| 3 | +Clone only the latest branch: |
| 4 | + |
| 5 | +```shell |
| 6 | +git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.6.2 |
| 7 | +``` |
| 8 | + |
| 9 | +Alternately, you can clone the whole repo and checkout the latest branch: |
| 10 | + |
| 11 | +```shell |
| 12 | +git clone https://github.com/asdf-vm/asdf.git ~/.asdf |
| 13 | +cd ~/.asdf |
| 14 | +git checkout "$(git describe --abbrev=0 --tags)" |
| 15 | +``` |
| 16 | + |
| 17 | +### Add to your Shell |
| 18 | + |
| 19 | +<!-- tabs:start --> |
| 20 | + |
| 21 | +#### ** Bash on Linux ** |
| 22 | + |
| 23 | +```bash |
| 24 | +echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bashrc |
| 25 | +echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc |
| 26 | +``` |
| 27 | + |
| 28 | +#### ** Bash on macOS ** |
| 29 | + |
| 30 | +```bash |
| 31 | +echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bash_profile |
| 32 | +echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile |
| 33 | +``` |
| 34 | + |
| 35 | +#### ** ZSH ** |
| 36 | + |
| 37 | +If you are using a framework, such as oh-my-zsh, use these lines. (Be sure |
| 38 | +that if you make future changes to .zshrc these lines remain _below_ the line |
| 39 | +where you source your framework.) |
| 40 | + |
| 41 | +```shell |
| 42 | +echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.zshrc |
| 43 | +echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc |
| 44 | +``` |
| 45 | + |
| 46 | +If you are not using a framework, or if on starting your shell you get an |
| 47 | +error message like 'command not found: compinit', then add this line before |
| 48 | +the ones above. |
| 49 | + |
| 50 | +```shell |
| 51 | +autoload -Uz compinit && compinit |
| 52 | +``` |
| 53 | + |
| 54 | +#### ** Fish ** |
| 55 | + |
| 56 | +```shell |
| 57 | +echo 'source ~/.asdf/asdf.fish' >> ~/.config/fish/config.fish |
| 58 | +mkdir -p ~/.config/fish/completions; and cp ~/.asdf/completions/asdf.fish ~/.config/fish/completions |
| 59 | +``` |
| 60 | + |
| 61 | +<!-- tabs:end --> |
| 62 | + |
| 63 | +Restart your shell so that PATH changes take effect. (Opening a new terminal |
| 64 | +tab will usually do it.) |
| 65 | + |
| 66 | +### Having Issues? |
| 67 | + |
| 68 | +If you're having issues with it not detecting the shims you've installed it's most-likely due to the sourcing of above `asdf.bash` or `asdf.fish` not being at the **BOTTOM** of your `~/.bash_profile`, `~/.zshrc`, or `~/.config/fish/config.fish`. It needs to be sourced **AFTER** you have set your `$PATH.` |
| 69 | + |
| 70 | +### Plugin Dependencies |
| 71 | + |
| 72 | +For most plugins, it is good if you have installed the following packages OR their equivalent on your OS |
| 73 | + |
| 74 | +<!-- tabs:start --> |
| 75 | + |
| 76 | +#### ** macOS ** |
| 77 | + |
| 78 | +Install these via homebrew: |
| 79 | + |
| 80 | +```shell |
| 81 | +coreutils automake autoconf openssl libyaml readline libxslt libtool unixodbc |
| 82 | +``` |
| 83 | + |
| 84 | +#### ** Ubuntu ** |
| 85 | + |
| 86 | +```shell |
| 87 | +automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev |
| 88 | +``` |
| 89 | + |
| 90 | +#### **Fedora** |
| 91 | + |
| 92 | +```shell |
| 93 | +automake autoconf readline-devel ncurses-devel openssl-devel libyaml-devel libxslt-devel libffi-devel libtool unixODBC-devel |
| 94 | +``` |
| 95 | + |
| 96 | +<!-- tabs:end --> |
| 97 | + |
| 98 | +**That's all ~! You are ready to use asdf** |
| 99 | + |
| 100 | +## Update |
| 101 | + |
| 102 | +```shell |
| 103 | +asdf update |
| 104 | +``` |
| 105 | + |
| 106 | +If you want the latest changes that aren't yet included in a stable release: |
| 107 | + |
| 108 | +```shell |
| 109 | +asdf update --head |
| 110 | +``` |
| 111 | + |
| 112 | +## Remove |
| 113 | + |
| 114 | +1. In your `.bashrc` (or `.bash_profile` if you are on OSX) or `.zshrc` find the lines that source `asdf.sh` and the autocompletions. The lines should look something like this: |
| 115 | + |
| 116 | + . $HOME/.asdf/asdf.sh |
| 117 | + . $HOME/.asdf/completions/asdf.bash |
| 118 | + |
| 119 | + Remove these lines and save the file. |
| 120 | + |
| 121 | +2. Run `rm -rf ~/.asdf/` to completely remove all the asdf files from your system. |
| 122 | + |
| 123 | +That's it! |
0 commit comments