自动补全失败与“bash:!ref:未绑定变量”

自动补全失败与“bash:!ref:未绑定变量”

当我尝试在 bash 终端中使用自动完成功能时TAB,我收到以下错误:

bash: !ref: unbound variable
bash: words[i]: unbound variable

额外细节:

$ echo $SHELL
/bin/bash

$ echo $BASH
/bin/bash

$ bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
Licesnse GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
...

命令的getent passwd $USER输出以:/bin/bash/

答案1

命令后问题已解决

$ set +u

相关内容