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

command auto autocompletion #3536

Open
kuchaguangjie opened this issue Feb 5, 2025 · 1 comment
Open

command auto autocompletion #3536

kuchaguangjie opened this issue Feb 5, 2025 · 1 comment
Labels
cli documentation Improvements or additions to documentation

Comments

@kuchaguangjie
Copy link

solana have cmd auto completion.
Any way to make anchor command support auto completion, e.g in bash?

@acheroncrypto acheroncrypto added documentation Improvements or additions to documentation cli labels Feb 5, 2025
@acheroncrypto
Copy link
Collaborator

We added support for it in #3251, but we don't yet have an official release that includes it. You can install the latest CLI using avm install 96ed3b7 to make it work. Then, run the following to add the completions for bash:

mkdir -p $HOME/.local/share/bash-completion/completions
anchor completions bash > $HOME/.local/share/bash-completion/completions/anchor
exec bash

We also added documentation for this in the old docs, but it looks like the new docs (#3531) doesn't mention how to add completions for shells. Let's leave the issue open until we add back the documentation.

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

No branches or pull requests

2 participants