Ahmed Aly:
related to alias how i do alias for kubectl to be k and autocomplete still working
Rahul Soni:
alias k=kubectl
complete -F __start_kubectl k
raghu:
@Rahul Soni I am facing below error with the above completion command. could you pls help?
error: $ k get po-bash: completion: function `__start_kubectl’ not found
Nagesh Jayaram:
please follow these steps,
- source <(kubectl completion bash)
- alias k=kubectl
- complete -F __start_kubectl k