Why do we need this line?
I ran following :
echo "source <(kubectl completion bash)" >> ~/.bashrc
alias k=kubectl
bash
These 3 work perfectly fine, what additional feature I get from the above line with sed? Can something go wrong? If so, can we open a new terminal during the exam?
echo "source <(kubectl completion bash | sed 's/kubectl/k/g' )" >> ~/.bashrc
Why do we need this line?
I ran following :
echo "source <(kubectl completion bash)" >> ~/.bashrc
alias k=kubectl
bash
These 3 work perfectly fine, what additional feature I get from the above line with sed? Can something go wrong? If so, can we open a new terminal during the exam?
If you don't use the line with sed, the autocomplete function with just the
k
letter will not work.For example: instead typping
kubectl
+ TAB for autocomplete, you just need to dok
+ TAB for autocomplete the command.You can open a new bash section just typping
bash
in the command line.If you have more questions just call me on my social medias and I help you :D