Docker命令tab无法补全的解决方法

  1. 安装bash-completion
# 1--
yum install -y bash-completion
  1. 刷新文件
# 2--
source /usr/share/bash-completion/completions/docker
source /usr/share/bash-completion/bash_completion