Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Command not found: complete on Macos 13.4.1 #1596

Closed
ducpt1012 opened this issue Jul 13, 2023 · 3 comments · Fixed by #1593
Closed

bug: Command not found: complete on Macos 13.4.1 #1596

ducpt1012 opened this issue Jul 13, 2023 · 3 comments · Fixed by #1593
Labels

Comments

@ducpt1012
Copy link

Describe the Bug

.asdf/completions/asdf.bash:89: command not found: complete

Steps to Reproduce

cd
git clone https://github.com/excid3/asdf.git ~/.asdf
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.zshrc
echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.zshrc
echo 'legacy_version_file = yes' >> ~/.asdfrc
exec $SHELL

Expected Behaviour

It displays this notice
.asdf/completions/asdf.bash:89: command not found: complete

Actual Behaviour

N/A

Environment

OS:
Darwin XXXX-MacBook-Pro.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64 x86_64

SHELL:
zsh 5.9 (x86_64-apple-darwin22.0)

BASH VERSION:
3.2.57(1)-release

ASDF VERSION:
v0.11.3-2f55f93

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/xxx/.asdf
ASDF_DIR=/Users/xxx/.asdf
ASDF_CONFIG_FILE=/Users/duc.pt/.asdfrc

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 4f8aa3d
ruby                         https://github.com/asdf-vm/asdf-ruby.git master bca6f3b

asdf plugins affected (if relevant)

No response

@ducpt1012 ducpt1012 added the bug label Jul 13, 2023
@hyperupcall
Copy link
Contributor

hyperupcall commented Jul 13, 2023

Are your installation steps from the official documentation?

The echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.zshrc command writes a command to a zsh file that sources a Bash-specific completion file. Bash uses the complete builtin for its completion system; Zsh does not have complete which is why you get the error.

To fix this, you can either:

  1. Enable bashcompinit before you source the completion file
  2. (preferred) Append a specific directory to fpath as shown in the getting started guide

@joeteerawit
Copy link

joeteerawit commented Jul 13, 2023

I'm install using fish & homebrew it doesn't work at all.
my work around solution is edit this file ~/.vscode/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.sh then change ASDF_DIR=${ASDF_DIR:-"${HOME}/.asdf"} to ASDF_DIR=${ASDF_DIR:-"/opt/homebrew/opt/asdf/libexec"} then restart vscode again

@hyperupcall
Copy link
Contributor

I'm pretty sure if you add ASDF_DIR=${ASDF_DIR:-"/opt/homebrew/opt/asdf/libexec to your shell startup file (or a Fish equivalent command for Fish), and then log out and then log in your computer, the environment variable should be set in in vscode

Related to #1584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants