解析ubuntu tab键不能自动补全命令的参数

/etc/bash.bashrc 里面有这几行语句

#enable bash completion in interactive shells
# if ! shopt -oq posix; then
 # if [ -f /usr/share/bash-completion/bash_completion ]; then
 #  . /usr/share/bash-completion/bash_completion
 # elif [ -f /etc/bash_completion ]; then
 #  . /etc/bash_completion
 # fi
# fi

去掉注释

#enable bash completion in interactive shells
if ! shopt -oq posix; then
 if [ -f /usr/share/bash-completion/bash_completion ]; then
  . /usr/share/bash-completion/bash_completion
 elif [ -f /etc/bash_completion ]; then
  . /etc/bash_completion
 fi
fi

.   /etc/bash.bashrc就ok了

以上所述是小编给大家介绍的ubuntu tab键不能自动补全命令的参数,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

你可能感兴趣的:(解析ubuntu tab键不能自动补全命令的参数)