Support command completions from installed tools
- Dominant language
- Go
- Stars
- 25.6k
- Forks
- 941
- Avg merge
- 9h 24m
- Merged PRs (30d)
- 3
Description
**Describe the solution you'd like**
I recently discovered asdf, and installed it hoping I could manage all my various hand-installed binaries (especially everything I use for Kubernetes). Most of the Kubernetes tools are much less useful without completions, as you often have to look up a pod name and then secondly perform some action on them, in two separate commands. With command completions, I can simply autocomplete the pod names, which saves me running an entire command.
A lot of kubernetes tools, such as `kubectl` and `helm` all include completions directly in the binary, but they have to be loaded like this (in zsh):
```zsh
source <(kubectl completion zsh)
source <(helm completion zsh)
```
I'm aware that many plugins provide completions in different ways, but pretty much all Kubernetes tools provide them like this.
Would it be possible for asdf to somehow enable the loading of completions from each plugin, such that a plugin author can include some configuration that tells asdf how to load completions.
**Describe similar asdf features and why they are not sufficient**
asdf already supplies completions for itself, but that doesn't help me look up pods via kubectl.
**Describe workarounds you've considered**
The simplest workaround would be to simply add all the completions in my .zshrc, like I've always done, but it would be nice if asdf automatically installed and set up the completions.
Contributor guide
Research direction
Start by reviewing asdf's existing completion support and plugin configuration, then compare the zsh examples for kubectl and helm with how installed plugins are exposed. Define how a plugin declares completion loading and what supported shells should do; done means installed tool completions load automatically without per-tool .zshrc entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes, zsh
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100