选项卡自动完成无法正常工作(/ etc / bash_completion无法正常工作)?

时间:2018-03-09 18:32:21

标签: bash

我在一个旧的ubuntu环境(Ubuntu 12.04.5 LTS)上,即使我将它包含在我的.bashrc中,bash_completion也无法正常工作:

if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

我尝试包含/ etc / bash_bashrc,但仍无法正常工作:

if [ -f /etc/bash_bashrc ]; then
. /etc/bash_bashrc
fi

user@old_skunk:~:$ cd loca-bash: exclude: unbound variable

user@old_skunk:~:$ls -al loca-bash: !ref: unbound variable
-bash: !ref: unbound variable
-bash: !ref: unbound variable
-bash: words[i]: unbound variable

1 个答案:

答案 0 :(得分:0)

请检查文件/etc/bash_completion的内容,然后检查是否有来自/usr/share/bash-completion/bash_completion的文件来源?

如果没有,那么bash_completion脚本本身不存在或已损坏?