【发布时间】:2014-03-28 19:13:59
【问题描述】:
bash 中的自动完成功能(使用 Tab)适用于文件夹,但不适用于文件。
- 我正在运行 Ubuntu 13.10
- 我没有动过我的 .bashrc 文件
这是 .bashrc 文件底部的样子,其中 bash-completion 部分已安装和更新:
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
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
有什么想法吗?
【问题讨论】:
-
也可以试试zsh。我喜欢它的完成能力。
-
@BasileStarynkevitch:谢谢你的建议。到目前为止我一直在使用 bash,但我会尽快研究 zsh!
标签: linux bash ubuntu terminal bash-completion