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

Feature request: autocompletion support #20

Open
josemaia opened this issue Mar 15, 2021 · 2 comments
Open

Feature request: autocompletion support #20

josemaia opened this issue Mar 15, 2021 · 2 comments

Comments

@josemaia
Copy link

Is there any way to implement shell autocompletion for the hashicorp tools on install?

For example, in my machine I have complete -o nospace -C /usr/local/bin/vault vault on my .zshrc. From what I can see, if I migrate to an asdf-powered installation of vault I'd have no easy way to run this.

@trallnag
Copy link

trallnag commented Sep 1, 2021

Would be nice, but I think this is out of scope for asdf. At least for now.

There are issues regarding that open on the main repository of asdf. It's really difficult to support all kinds of shells and ways to enable auto completion. This is also why many tools like Terraform just opt to provide a command like terraform complete instead of setting it up automatically.

I install all my tools via a central Ansible playbook, so I handle the auto complete in separate tasks.

@radditude
Copy link
Member

Indeed, this is a bit tricky! We could potentially call the tool's own autocomplete install command after install, but that seems prone to problems, not least because most tools support autocomplete for only bash and zsh. Not to mention the fact that there is no one common command for this across HashiCorp tooling:

One solution that comes to mind would be supporting an after install hook that the user provides - something like a .terraform-post-install file, which would allow the user to customize their autocomplete setup to their shell and a given tool.

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

No branches or pull requests

3 participants