You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
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.The text was updated successfully, but these errors were encountered: