fakis

刚重装了一下 Ubuntu 10.04 server,发现使用TAB键自动补全的方法失效,在网上找了一下,终于找到解决方法

编辑/etc/bash.bashrc文件(必须以管理员权限),找到以下几行:

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

把后三行前面的#去掉,取消注释,变为:

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

然后重新打开终端窗口(或者重新登录),恢复正常。

分类:

技术点:

相关文章:

  • 2021-05-24
  • 2021-11-24
  • 2021-11-25
  • 2021-11-30
  • 2021-04-21
  • 2021-06-28
  • 2022-01-27
猜你喜欢
  • 2022-02-16
  • 2022-12-23
  • 2021-12-04
  • 2021-12-21
  • 2022-12-23
  • 2022-01-17
  • 2021-04-02
相关资源
相似解决方案