From 9535c409e755cc1cfc838d430feb51bfdd9df431 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Mon, 24 Jun 2024 09:24:32 +0000 Subject: [PATCH] feat: Ajout completion pour podman --- aliases.d/kubectl | 7 +++++++ completion.d/podman | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 completion.d/podman diff --git a/aliases.d/kubectl b/aliases.d/kubectl index 06257c8..6cf0ea7 100644 --- a/aliases.d/kubectl +++ b/aliases.d/kubectl @@ -8,9 +8,16 @@ if (command -v kubectl &>/dev/null); then alias kd="kubectl describe" alias ks="kubectl --namespace kube-system" alias kga="kubectl get --all-namespaces" + alias kuc="kubectl config unset current-context" + alias kgworkers="kubectl get nodes --selector '!node-role.kubernetes.io/control-plane' --label-columns heat,topology.kubernetes.io/zone,topology.kubernetes.io/region --sort-by metadata.labels.heat" # add completion for the alias as well complete -o default -F __start_kubectl k complete -o default -F __start_kubectl ks + # Experimental + complete -o default -F _complete_alias kg + complete -o default -F _complete_alias kd + complete -o default -F _complete_alias kga + fi diff --git a/completion.d/podman b/completion.d/podman new file mode 100644 index 0000000..e4f61bb --- /dev/null +++ b/completion.d/podman @@ -0,0 +1,5 @@ +#!/bin/bash + +if (command -v podman &>/dev/null); then + source <(podman completion bash) +fi