Ubuntu设置tab自动补全

2022/7/11 5:20:13

本文主要是介绍Ubuntu设置tab自动补全,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1.切换root用户,查看 /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

vi 文件删除对应代码注释

# 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

保存退出 :wq!

3.source 文件

source /etc/bash.bashrc

 



这篇关于Ubuntu设置tab自动补全的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程