LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1004|回复: 6

debian 下的apt能不能像ubuntu那样自动补全

[复制链接]
发表于 2006-11-29 21:37:05 | 显示全部楼层 |阅读模式
在ubuntu中apt-get install xxx<tab> 能自动补全
debian 下呢?
发表于 2006-11-29 21:57:18 | 显示全部楼层
肯定可以,我一直用
把 .bashrc里面
. /etc/bash_completion前面的注释去掉
回复 支持 反对

使用道具 举报

发表于 2006-11-29 22:16:54 | 显示全部楼层
在 ~/.bashrc 中加入:
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-29 22:42:22 | 显示全部楼层
谢谢。我去试试
回复 支持 反对

使用道具 举报

发表于 2006-11-30 01:10:47 | 显示全部楼层
Post by well
在 ~/.bashrc 中加入:
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi


哈哈 该我惭愧了
回复 支持 反对

使用道具 举报

发表于 2006-11-30 12:20:36 | 显示全部楼层
我用Debian unstable,普通用户的.bashrc中已经有了,使用也正常,虽然在普通用户apt-get install没什么用。但在root的.bashrc中加上就不起作用,. /etc/bash_completion就可以用。从普通用户的.bashrc中复制过去也不行。后来加在root的.bash_profile中就行了。
回复 支持 反对

使用道具 举报

发表于 2006-11-30 17:32:53 | 显示全部楼层
Post by ibmwebzh
我用Debian unstable,普通用户的.bashrc中已经有了,使用也正常,虽然在普通用户apt-get install没什么用。但在root的.bashrc中加上就不起作用,. /etc/bash_completion就可以用。从普通用户的.bashrc中复制过去也不行。后来加在root的.bash_profile中就行了。

.bash_profile是登陆时执行的脚本,普通用户的.bash_profile一般都有. .bashrc这一项,所以加在.bashrc里面有效
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表