diff --git a/rc.d/kubectl b/aliases.d/kubectl similarity index 72% rename from rc.d/kubectl rename to aliases.d/kubectl index 2569e1c..aa768eb 100644 --- a/rc.d/kubectl +++ b/aliases.d/kubectl @@ -1,11 +1,8 @@ #!/bin/bash -if (which kubectl &> /dev/null) +if (command -v kubectl &> /dev/null) then - # activate completion - source <(kubectl completion bash) - # create a quick alias alias k=kubectl alias ks="kubectl --namespace kube-system" diff --git a/rc.d/helm b/completion.d/helm similarity index 50% rename from rc.d/helm rename to completion.d/helm index f19f0cd..fb0b30f 100644 --- a/rc.d/helm +++ b/completion.d/helm @@ -1,9 +1,6 @@ #!/bin/bash -if (which helm &> /dev/null) +if (command -v helm &> /dev/null) then - - # activate completion source <( helm completion bash ) - fi diff --git a/completion.d/kubectl b/completion.d/kubectl index 5ea5f20..117399e 100644 --- a/completion.d/kubectl +++ b/completion.d/kubectl @@ -1,6 +1,6 @@ #!/bin/bash -if ( which kubectl ) &> /dev/null +if (command -v kubectl &> /dev/null) then source <(kubectl completion bash) fi diff --git a/rc.d/stern b/completion.d/stern similarity index 50% rename from rc.d/stern rename to completion.d/stern index e38c12f..d736dfa 100644 --- a/rc.d/stern +++ b/completion.d/stern @@ -1,9 +1,6 @@ #!/bin/bash -if (which stern &> /dev/null) +if (command -v stern &> /dev/null) then - - # activate completion source <(stern --completion bash) - fi