-bash: _docker_machine_ps1: 未找到命令
场景:在安装完docker-machine,设置docker-machine命令自动补齐的时候,出现以下错误:
-bash: __docker_machine_ps1: 未找到命令
解决办法:在~/.bashrc中添加如下三行:
source /etc/bash_completion.d/docker-machine-wrapper.bash
source /etc/bash_completion.d/docker-machine-prompt.bash
source /etc/bash_completion.d/docker-machine.bash
然后重新进行 source /root/.bashrc