0

我正在尝试做的事情:

# OR for Max OSX
echo '. $HOME/.asdf/asdf.sh' >> ~/.bash_profile
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile

我做到了,然后:

MBP-slava:~ slava$ asdf plugin-list
-bash: asdf: command not found

然后我这样做了:

cd $HOME
touch .bash_profile
vim .bash_profile

#.bash_profile

. slava/.asdf/asdf.sh
. slava/.asdf/completions/asdf.bash
.
.
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
~                                                                                                                                                                                                           
~                                                                                                                                                                                                           
~     

我试着:

. .bash_profile

哪个输出:

-bash: slava/.asdf/asdf.sh: No such file or directory
-bash: slava/.asdf/completions/asdf.bash: No such file or directory
-bash: .: filename argument required
.: usage: . filename [arguments]
-bash: .: filename argument required
.: usage: . filename [arguments]

接着:

MBP-slava:~ slava$ asdf plugin-list
-bash: asdf: command not found

OS X 埃尔卡皮坦

图书馆:https ://github.com/asdf-vm/asdf

4

2 回答 2

0

如果您的动机是将可执行文件的路径添加asdf.shPATH环境变量,那么请执行

PATH="$PATH:$HOME/.asdf/"
echo "$PATH">>~/.bash_profile

启动一个新的终端会话 - 使新的 .bash_profile 生效,然后运行类似的命令

asdf.sh # Autocomplete should work for this
于 2016-07-27T16:24:33.117 回答
0

设置说明不正确 - Homebrew 公式安装的东西有点不同。路径(在 Bash 的情况下)是:

. /usr/local/opt/asdf/asdf.sh
. /usr/local/opt/asdf/etc/bash_completion.d/asdf.bash
于 2020-06-26T23:53:38.390 回答