0

What I'm trying to do:

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

I did it, then:

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

Then I did this:

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
~                                                                                                                                                                                                           
~                                                                                                                                                                                                           
~     

I try to:

. .bash_profile

Which outputs:

-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]

And then:

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

OS X El Capitan

Library: https://github.com/asdf-vm/asdf

Stratus3D
  • 4,648
  • 4
  • 35
  • 67
Joe Half Face
  • 2,303
  • 1
  • 17
  • 45

2 Answers2

0

If your motive is to add the path to the executable asdf.sh to PATH environment variable, then do

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

Start a new terminal session - for the new .bash_profile - to be in effect, and run the command like

asdf.sh # Autocomplete should work for this
sjsam
  • 21,411
  • 5
  • 55
  • 102
0

The setup instructions are incorrect - the Homebrew formula installs things a bit differently. The paths (in case of Bash) are:

. /usr/local/opt/asdf/asdf.sh
. /usr/local/opt/asdf/etc/bash_completion.d/asdf.bash