Docker命令-无bash提示补全修复
Bash命令补全
Docker命令补全实际是使用bash-completion的功能
macOS
安装命令:brew install bash-completion
Ubuntu或者Debian
安装命令:apt install -y bash-completion
CentOS或者RHEL
安装命令:yum install bash-completion
安装完验证:rpm -qa |grep bash-completion
补全设定方法: docker
如果您的Docker是通过二进制包安装的,无此文件/usr/share/bash-completion/completions/docker
- 设定docker的补全文件: https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker
- 拷贝目的:
/usr/share/bash-completion/completions/
和/etc/bash_completion.d/