Closed petergarnaes closed 7 months ago
Thanks, should be fixed now. Not working with kubernetes myself at the moment which makes the completer a bit ambitious.
You can use the official completions as a workaround if you encounter issues like this:
# ~/.config/carapace/specs/kubectl.yaml
name: kubectl
description: kubectl controls the Kubernetes cluster manager
completion:
positionalany: ["$carapace.bridge.Cobra([kubectl])"]
Thanks for a quick response 😃 Workaround works like a charm 👍🏻 Thanks for a great project!
Current Behavior
When autocompleting the name of a specific resource in a given namespace, for example when using
kubectl describe
, the command can not provide options when namespace is set through the command flag.So when writing something like:
and then pressing tab for completion, the command does not know to use the provided namespace.
I tested with setting the namespace in the
.kube/config
file (and not providing the--namespace
flag), an then it works flawlessly.Expected Behavior
kubectl get ...
,kubectl describe ...
,kubectl delete ...
,kubectl scale ...
,kubectl label ...
and all other commands working with kubernetes resources in the cluster should be able to autocomplete or provide options for resource names in the namespace provided through the--namespace
flag, if provided.This is how it works in the kubectl plugin for oh-my-zsh.
Steps To Reproduce
--namespace
flag set to the namespace of the resourceVersion
0.29.7
OS
Shell
Anything else?
No response