Bash
Add kubecolor
alias and config in the ~/.bashrc
file:
Completions
In Bash, the above alias
setting does not distrupt completions on kubectl
, even though it’s remapped to execute kubecolor
.
However, if you want completion when explicitly running kubecolor
then you need to add the following:
If you are using an alias like k=kubectl
, then you also need to add completion for k
:
As a prerequisite, you need kubectl
completions installed.
This can be achieved by either of these steps:
-
If your
kubectl
installation already came shipped with bash completions (when you didapt install kubectl
,dnf install kubectl
, etc). Try outkubectl
to see if the completions are already installed before you install it twice. -
or you add this to
~/.bashrc
: