asdf-vm/asdf

Support command completions from installed tools

Open

#752 建立於 2020年6月29日

在 GitHub 查看
 (8 留言) (23 反應) (0 負責人)Go (23,759 star) (881 fork)batch import
enhancementhelp wanted

描述

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):

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.

貢獻者指南

Support command completions from installed tools · asdf-vm/asdf#752 | Good First Issue