yecheng 's Library tagged → View Popular
30 Oct 07
sudo的自动补全
-
在使用ubuntu的时候有时候会出现sudo 输入命令的时候不能自动补全,这着实让人郁闷,这里提供一种方法 ,这是我从网上搜集过来的
在.bashrc这个文件中添加
# enable programmable completion features (you don’t need to enable
# this, if it’s already enabled in /etc/bash.bashrc and /etc/profiles
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
然后重新登陆终端就可以了
bash-completion:增强bash自动补齐功能
-
默认情况下,在bash中按 TAB 可以自动补齐,但仅能自动补齐命令名和文件名。bash-2.05及以后的版本提供了自动补齐的编程接口,通过安装 bash-completion 来使用 TAB 键自动补齐几乎任何内容,包括参数、文件、目录甚至包名称等等。
1 - 3 of 3
Showing 20▼ items per page
Selected Tags
Related Tags
Sponsored Links
Ads by Google
Top Contributors
Groups interested in sudo
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo
