zsh-users
 help / color / mirror / code / Atom feed
* Composing completions for a wrapper script
@ 2021-10-30 22:07 Anton Suslov
  2021-10-30 23:00 ` Jérémie Roquet
  2021-10-31 13:22 ` Mikael Magnusson
  0 siblings, 2 replies; 7+ messages in thread
From: Anton Suslov @ 2021-10-30 22:07 UTC (permalink / raw)
  To: zsh-users

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".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-01  7:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30 22:07 Composing completions for a wrapper script Anton Suslov
2021-10-30 23:00 ` Jérémie Roquet
2021-10-31  6:14   ` Anton Suslov
2021-10-31 13:22 ` Mikael Magnusson
2021-10-31 20:32   ` Bart Schaefer
2021-11-01  7:13     ` Anton Suslov
2021-11-01  7:53       ` Anton Suslov

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).