docs: Properly quote variables in instructions (#1432)

This commit is contained in:
Edwin Kofler 2023-01-16 18:37:07 -08:00 committed by GitHub
parent d81b81f9de
commit fc5db6d596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 109 additions and 110 deletions

View File

@ -45,7 +45,6 @@ We highly recommend using the official `git` method.
| Homebrew | `brew install asdf` |
| Pacman | `git clone https://aur.archlinux.org/asdf-vm.git && cd asdf-vm && makepkg -si` or use your preferred [AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers) |
## 3. Install asdf
There are many different combinations of Shells, OSs & Installation methods all of which affect the configuration here. Expand the selection below that best matches your system:
@ -55,13 +54,13 @@ There are many different combinations of Shells, OSs & Installation methods all
Add the following to `~/.bashrc`:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
Completions must be configured by adding the following to your `.bashrc`:
```shell
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/completions/asdf.bash"
```
:::
@ -73,13 +72,13 @@ If using **macOS Catalina or newer**, the default shell has changed to **ZSH**.
Add the following to `~/.bash_profile`:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
Completions must be configured manually with the following entry in your `.bash_profile`:
```shell
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/completions/asdf.bash"
```
:::
@ -89,13 +88,13 @@ Completions must be configured manually with the following entry in your `.bash_
Add `asdf.sh` to your `~/.bashrc` with:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.bashrc
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bashrc
```
Completions will need to be [configured as per Homebrew's instructions](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash) or with the following:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.bashrc
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bashrc
```
:::
@ -107,13 +106,13 @@ If using **macOS Catalina or newer**, the default shell has changed to **ZSH**.
Add `asdf.sh` to your `~/.bash_profile` with:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.bash_profile
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bash_profile
```
Completions will need to be [configured as per Homebrew's instructions](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash) or with the following:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.bash_profile
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bash_profile
```
:::
@ -212,7 +211,7 @@ Completions are automatically configured.
Add the following to `~/.zshrc`:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
**OR** use a ZSH Framework plugin like [asdf for oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/asdf) which will source this script and setup completions.
@ -263,7 +262,7 @@ Completions are placed in a ZSH friendly location, but [ZSH must be configured t
Add `asdf.nu` to your `~/.config/nushell/config.nu` with:
```shell
"\nlet-env ASDF_NU_DIR = ($env.HOME | path join '.asdf')\n source " + ($env.HOME | path join '.asdf/asdf.nu') | save --append $nu.config-path
"\nlet-env ASDF_NU_DIR = ($env.HOME | path join '.asdf')\n source " + ($env.HOME | path join '.asdf/asdf.nu') | save --append $nu.config-path
```
Completions are automatically configured
@ -274,7 +273,7 @@ Completions are automatically configured
Add `asdf.nu` to your `~/.config/nushell/config.nu` with:
```shell:no-line-numbers
"\nlet-env ASDF_NU_DIR = (brew --prefix asdf | into string | path join 'libexec')\n source " + (brew --prefix asdf | into string | path join 'libexec/asdf.nu') | save --append $nu.config-path
"\nlet-env ASDF_NU_DIR = (brew --prefix asdf | into string | path join 'libexec')\n source " + (brew --prefix asdf | into string | path join 'libexec/asdf.nu') | save --append $nu.config-path
```
Completions are automatically configured
@ -285,7 +284,7 @@ Completions are automatically configured
Add `asdf.nu` to your `~/.config/nushell/config.nu` with:
```shell
"\nlet-env ASDF_NU_DIR = '/opt/asdf-vm/'\n source /opt/asdf-vm/asdf.nu" | save --append $nu.config-path
"\nlet-env ASDF_NU_DIR = '/opt/asdf-vm/'\n source /opt/asdf-vm/asdf.nu" | save --append $nu.config-path
```
Completions are automatically configured.

View File

@ -83,20 +83,20 @@ To uninstall `asdf` follow these steps:
1. In your `~/.bashrc` remove the lines that source `asdf.sh` and the completions:
```shell
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
```
2. Remove the `$HOME/.asdf` dir:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -106,20 +106,20 @@ rm -rf $HOME/.tool-versions $HOME/.asdfrc
1. In your `~/.bash_profile` remove the lines that source `asdf.sh` and the completions:
```shell
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
```
2. Remove the `$HOME/.asdf` dir:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -144,7 +144,7 @@ brew uninstall asdf --force
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -171,7 +171,7 @@ brew uninstall asdf --force
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -193,13 +193,13 @@ pacman -Rs asdf-vm
3. Remove the `$HOME/.asdf` dir:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -221,13 +221,13 @@ rm -rf ~/.config/fish/completions/asdf.fish
2. Remove the `$HOME/.asdf` dir:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -249,7 +249,7 @@ brew uninstall asdf --force
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -271,13 +271,13 @@ pacman -Rs asdf-vm
3. Remove the `$HOME/.asdf` dir:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -306,7 +306,7 @@ if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -335,7 +335,7 @@ brew uninstall asdf --force
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -370,7 +370,7 @@ if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
4. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -380,7 +380,7 @@ rm -rf $HOME/.tool-versions $HOME/.asdfrc
1. In your `~/.zshrc` remove the lines that source `asdf.sh` and completions:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
# ...
fpath=(${ASDF_DIR}/completions $fpath)
autoload -Uz compinit
@ -392,13 +392,13 @@ compinit
2. Remove the `$HOME/.asdf` dir:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -420,7 +420,7 @@ brew uninstall asdf --force && brew autoremove
3. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -442,13 +442,13 @@ pacman -Rs asdf-vm
3. Remove the `$HOME/.asdf` dir:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. Run this command to remove all `asdf` config files:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::

View File

@ -50,13 +50,13 @@ Existem diversas combinações de shells, sistemas operacionais e métodos de in
Adicione esta linha ao seu `~/.bashrc`:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
O auto completar deve ser configurado manualmente a partir da adição da seguinte linha ao `.bashrc`:
```shell
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/completions/asdf.bash"
```
:::
@ -68,13 +68,13 @@ Se você estiver usando o **macOS Catalina ou mais recente**, o shell padrão mu
Adicione esta linha ao seu `~/.bash_profile`:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
O auto completar deve ser configurado manualmente a partir da adição da seguinte linha ao `.bash_profile`:
```shell
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/completions/asdf.bash"
```
:::
@ -90,7 +90,7 @@ echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.bashrc
O auto completar deve ser configurado seguindo as [instruções da Homebrew](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash), ou as seguintes:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.bashrc
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bashrc
```
:::
@ -108,7 +108,7 @@ echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.bash_profile
O auto completar deve ser configurado seguindo as [instruções da Homebrew](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash), ou as seguintes:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.bash_profile
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bash_profile
```
:::
@ -207,7 +207,7 @@ Ao concluir atualizará automaticamente
Adicione a seguinte linha ao seu `~/.zshrc`:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
**OU** utilize um framework para ZSH, como [asdf para oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/asdf) que irá adicionar o script e o auto completar.

View File

@ -37,7 +37,7 @@ Para isntalar somente uma ferramenta definida em `.tool-versions`, execute o cam
Edite o arquivo diretamente no diretório ou use `asdf local` (ou `asdf global`) para atualiza-lo.
## \$HOME/.asdfrc
## `$HOME/.asdfrc`
Adicione um arquivo `.asdfrc` ao seu diretório home e asdf usará as configurações especificadas no arquivo. O arquivo deve ser formatado assim:

View File

@ -4,7 +4,7 @@
A lista de comandos do núcleo `asdf` é bastante pequena, mas pode facilitar muitos fluxos de trabalho.
## Instalação e configuração
## Instalação e configuração
Baseado no [Guia de Introdução](/pt-br/guide/getting-started.md).
@ -85,20 +85,20 @@ Para desinstalar `asdf` siga os passos:
1. Em seu `~/.bashrc` remova as linhas do `asdf.sh` e seus complementos:
```shell
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
```
2. Remova o diretório `$HOME/.asdf`:
```shell
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -108,20 +108,20 @@ rm -rf $HOME/.tool-versions $HOME/.asdfrc
1. Em seu `~/.bash_profile` remova as linhas do `asdf.sh` e remova seus complementos:
```shell
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
```
2. Remova o diretório `$HOME/.asdf`:
```shell
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -146,7 +146,7 @@ brew uninstall asdf --force
3. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -173,7 +173,7 @@ brew uninstall asdf --force
3. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -195,13 +195,13 @@ pacman -Rs asdf-vm
3. Remova o diretório `$HOME/.asdf`:
```shell
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -223,13 +223,13 @@ rm -rf ~/.config/fish/completions/asdf.fish
2. Remova o diretório `$HOME/.asdf`:
```shell
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -251,7 +251,7 @@ brew uninstall asdf --force
3. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -273,13 +273,13 @@ pacman -Rs asdf-vm
3. Remova o diretório `$HOME/.asdf`:
```shell
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -308,7 +308,7 @@ if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
3. Execute este comando para remover todos os arquivos de configuração `asdf`:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -337,7 +337,7 @@ brew uninstall asdf --force
3. Execute este comando para remover todos os arquivos de configuração `asdf`:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -372,7 +372,7 @@ if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
4. Execute este comando para remover todos os arquivos de configuração `asdf`:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -382,7 +382,7 @@ rm -rf $HOME/.tool-versions $HOME/.asdfrc
1. Em seu `~/.zshrc` remova as linhas do `asdf.sh` e seus complementos:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
# ...
fpath=(${ASDF_DIR}/completions $fpath)
autoload -Uz compinit
@ -394,13 +394,13 @@ compinit
2. Remova o diretório `$HOME/.asdf`:
```shell
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -422,7 +422,7 @@ brew uninstall asdf --force
3. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -444,13 +444,13 @@ pacman -Rs asdf-vm
3. Remova o diretório `$HOME/.asdf`:
```shell
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. Execute o comando para remover todos os arquivos de configurações do `asdf`:
```shell
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::

View File

@ -50,13 +50,13 @@
`~/.bashrc` 文件中加入以下内容:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
补全功能必须在 `.bashrc` 文件中加入以下内容来配置完成:
```shell
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/completions/asdf.bash"
```
:::
@ -68,13 +68,13 @@
`~/.bash_profile` 文件中加入以下内容:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
补全功能必须在 `.bash_profile` 文件中使用以下内容手动配置完成:
```shell
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/completions/asdf.bash"
```
:::
@ -84,13 +84,13 @@
使用以下命令将 `asdf.sh` 加入到 `~/.bashrc` 文件中:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.bashrc
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bashrc
```
补全功能将需要 [按照 Homebrew 的说明完成配置](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash) 或者执行以下命令:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.bashrc
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bashrc
```
:::
@ -102,13 +102,13 @@ echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.bashrc
使用以下命令将 `asdf.sh` 加入到 `~/.bash_profile` 文件中:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.bash_profile
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bash_profile
```
补全功能将需要 [按照 Homebrew 的说明完成配置](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash) 或者执行以下命令:
```shell:no-line-numbers
echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.bash_profile
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bash_profile
```
:::
@ -148,7 +148,7 @@ mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.
echo -e "\nsource "(brew --prefix asdf)"/libexec/asdf.fish" >> ~/.config/fish/config.fish
```
Fish shell 的补全功能可以交给 [ Homebrew 处理](https://docs.brew.sh/Shell-Completion#configuring-completions-in-fish). 很友好!
Fish shell 的补全功能可以交给 [Homebrew 处理](https://docs.brew.sh/Shell-Completion#configuring-completions-in-fish). 很友好!
:::
::: details Fish & Pacman
@ -209,7 +209,7 @@ echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/
`~/.zshrc` 文件中加入以下内容:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
```
**或者** 使用 ZSH 框架插件,比如 [asdf for oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/asdf) 将会使脚本生效并安装补全功能。

View File

@ -83,20 +83,20 @@ nodejs 16.5.0
1. 在 `~/.bashrc` 配置文件中移除生效 `asdf.sh` 和补全功能的行:
```shell
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
```
2. 移除 `$HOME/.asdf` 目录:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -106,20 +106,20 @@ rm -rf $HOME/.tool-versions $HOME/.asdfrc
1. 在 `~/.bash_profile` 配置文件中移除生效 `asdf.sh` 和补全功能的行:
```shell
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
```
2. 移除 `$HOME/.asdf` 目录:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -144,7 +144,7 @@ brew uninstall asdf --force
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -171,7 +171,7 @@ brew uninstall asdf --force
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -193,13 +193,13 @@ pacman -Rs asdf-vm
3. 移除 `$HOME/.asdf` 目录:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -221,13 +221,13 @@ rm -rf ~/.config/fish/completions/asdf.fish
2. 移除 `$HOME/.asdf` 目录:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -249,7 +249,7 @@ brew uninstall asdf --force
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -271,13 +271,13 @@ pacman -Rs asdf-vm
3. 移除 `$HOME/.asdf` 目录:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -306,7 +306,7 @@ if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -335,7 +335,7 @@ brew uninstall asdf --force
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -370,7 +370,7 @@ if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
4. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -380,7 +380,7 @@ rm -rf $HOME/.tool-versions $HOME/.asdfrc
1. 在 `~/.zshrc` 配置文件中移除生效 `asdf.sh` 和补全功能的行:
```shell
. $HOME/.asdf/asdf.sh
. "$HOME/.asdf/asdf.sh"
# ...
fpath=(${ASDF_DIR}/completions $fpath)
autoload -Uz compinit
@ -392,13 +392,13 @@ compinit
2. 移除 `$HOME/.asdf` 目录:
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -420,7 +420,7 @@ brew uninstall asdf --force && brew autoremove
3. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::
@ -442,13 +442,13 @@ pacman -Rs asdf-vm
3. 移除 `$HOME/.asdf` 目录
```shell:no-line-numbers
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
```
4. 执行以下命令移除 `asdf` 所有配置文件:
```shell:no-line-numbers
rm -rf $HOME/.tool-versions $HOME/.asdfrc
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
```
:::