14

Auto-update bash completions for kubectl, minikube and helm

 3 years ago
source link: https://kuttler.eu/code/auto-update-bash-completions-kubectl-minikube-helm/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Auto-update bash completions for kubectl, minikube and helm

This bash completion script ensures that you always get the matching bash completions for the installed kubectl, minikube and helm. Simply source it and it will do the rest.

Raw
#!/bin/bash

if command -v minikube >/dev/null 2>&1; then
  source <(minikube completion bash)
  echo "You may want to run"
  echo "source <(minikube docker-env)"
fi

if command -v kubectl >/dev/null 2>&1; then
  source <(kubectl completion bash)
fi

if command -v helm >/dev/null 2>&1; then
  source <(helm completion bash)
fi

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK