从大神到小白之路minishift 命令补全
工欲善其事,必先利其器
ubuntu下minishift 和oc (openshift command) 命令行补全
ubuntu默认使用bash,并且已经启用了命令补全功能
前提
minishift在ubuntu上能正常工作,oc命令加入path
1.使用root用户
sudo su
cd ~
2. 生成minishift补全文件
minishift completion bash > ~/.minishift-completion
3.生成oc补全文件
oc completion bash > oc_completion.sh
4.编辑bashrc文件
gedit .bashrc
加入source操作
source ~/oc_completion.sh
source ~/.minishift-completion
source ~/.minishift-completion
5.效果
输入mini按tab,自动补全为minishift 再输入p按tab自动补全为minishift profile,再输入l按tab,自动补全为minishift profile list
- minishift Stopped
- nanoshift Stopped (Active)
输入minishift按两下tab,会提示可选项
- nanoshift Stopped (Active)
输入minishift按两下tab,会提示可选项
addons delete ip profile start version
completion docker-env logs services status
config hostfolder oc-env setup stop
console image openshift ssh update
completion docker-env logs services status
config hostfolder oc-env setup stop
console image openshift ssh update
输入oc l按2下tab
label login logout logs