参考链接:https://docker.blog.csdn.net/article/details/106614751?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-106614751-blog-124306698.pc_relevant_multi_platform_whitelistv1&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-106614751-blog-124306698.pc_relevant_multi_platform_whitelistv1&utm_relevant_index=1
后续在k8s和openshift中都会使用到该方法,添加对应的命令补全。
k8s:
kubectl completion bash >/etc/bash_completion.d/kubectl
openshift:
oc completion bash > /etc/bash_completion.d/openshift
openshift-install completion bash > /etc/bash_completion.d/openshift-install
命令补全的知识点bash-completion可以和使用到的不同工具相互印证