feat: Suppression completion ssh obsolete
This commit is contained in:
parent
84ffaf33d2
commit
a6905b9489
@ -9,15 +9,7 @@ if (command -v kubectl &>/dev/null); then
|
|||||||
alias ks="kubectl --namespace kube-system"
|
alias ks="kubectl --namespace kube-system"
|
||||||
alias kga="kubectl get --all-namespaces"
|
alias kga="kubectl get --all-namespaces"
|
||||||
alias kuc="kubectl config unset current-context"
|
alias kuc="kubectl config unset current-context"
|
||||||
|
alias kun="kubectl config set-context --current --namespace="
|
||||||
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"
|
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
|
fi
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#SSH
|
|
||||||
if [ -e ~/.ssh/config ]; then
|
|
||||||
complete -W "$(cat ~/.ssh/config | egrep -i "^\s*host\s+[a-zA-Z]" | sed -e "s/^host\s*//i")" ssh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e ~/.ssh/known_hosts ]; then
|
|
||||||
complete -W "$(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\[")" ssh
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user