kubectx icon indicating copy to clipboard operation
kubectx copied to clipboard

Feature-request: Add sub-command to output completion scripts

Open jonaskello opened this issue 3 years ago • 2 comments

Most other commands I want completion for has a sub-command to output the completion script. For example kubectl has this so all I need to add in my .zshrc is this:

source <(kubectl completion zsh)

I cannot find this kind of command for kubectx, instead I need a lot of manual steps to set this up and it also becomes hard to setup when using shared dotfiles across machines as it requires copying the completion scripts and making symlinks etc.

jonaskello avatar Sep 04 '21 15:09 jonaskello

@jonaskello ideally the package manager you are using to install kubectx should be installing the completion script (it does for Homebrew, for example).

Maybe with Go implementation we can embed such completion files to a hidden subcmd like you described as well, so I'll keep this as a feature request.

ahmetb avatar Sep 07 '21 17:09 ahmetb

Duplicate of https://github.com/ahmetb/kubectx/issues/250 ?

anton-ryzhov avatar Jan 04 '22 08:01 anton-ryzhov