Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Composing completions for a wrapper script
- X-seq: zsh-users 27299
- From: Anton Suslov <anton_suslov@xxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Composing completions for a wrapper script
- Date: Sun, 31 Oct 2021 01:07:47 +0300
- Archived-at: <https://zsh.org/users/27299>
- List-id: <zsh-users.zsh.org>
Hi, everyone!
I am writing some wrapper functions over existing commands, e.g.
kubectldc() {
DC="$1"
shift
KUBECONFIG="$HOME/.kube/$DC.kubeconfig" kubectl "$@"
}
Kubectl is a well-behaved command, which does have rich completion available. Is it possible to somehow reuse its completion for kubectldc command? As-is the function definition becomes a tradeoff between "using kubectl directly for completion but having to select config manually" and "using the wrapper for automatic config but no completion".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author