Unbunt tab 自动补全

1、利用vi编辑器打开 /etc/bash.bashrc文件(需要root权限)

sudo vi /etc/bash.bashrc

2、找到文件中的下列代码

#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

3、将注释符号#去掉,即改成

#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

4、最后 source一下 /etc/bash.bashrc即可, 即

sudo source /etc/bash.bashrc

 

上一篇:Dubbo03【管理控制台和监控中心搭建】,架构师带你玩转Redis高性能缓存设计实战


下一篇:【C++】面向对象之多态篇