安装 bash-completion 和 eselect
$ emerge -av bash-completion eselect
$ emerge gentoo-bashcomp
启用gentoo-bashcomp
$ bashcomp-config enable gentoo
$ bashcomp-config enable gentoo
$ bashcomp-config enable subversion
$ bashcomp-config list
$ source ~/.bashrc TIP Bash completion
bash-completion使用
原址:http://blog.chinaunix.net/u/20816/showart_284367.html
编辑 /etc/make.conf 加入 bash-completion USE 标记。
然后重新编译系统里所有支持这个 USE 标记的软件包:
$ emerge -avuN world
安装 bash-completion 和 eselect
$ emerge -av bash-completion eselect
确保 ~/.bashrc 里有下面一行:
[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion
最后source一下~/.bashrc:
$ source ~/.bashrc
为了给portage相关命令(比如emerge, equery, revdep-rebuild 等) 加上 tab 补齐功能,
需要安装 gentoo-bashcomp
$ emerge gentoo-bashcomp
启用gentoo-bashcomp
$ bashcomp-config enable gentoo
$ source ~/.bashrc
列出需要手工启用bash-completion的命令列表
$ bashcomp-config list
启用rar的bash-completion
$ bashcomp-config enable unrar
$ source ~/.bashrc
Bash Completion in Gentoo
In Gentoo, bash-completion
is not enabled by default, so for each package compiled with bash-completion support, we need to manually enable it for completion. Here’re the relevant steps and tools to manage bash-completion
.
$ emerge bash-completion eselect
Activate bash-completion in bashrc
:
[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion
Add to USE flag, so packages can be compiled with bash-completion support if available:
USE="bash-completion"
Use eselect
to view and manage packages availabe for bash-completion:
$ eselect bashcomp list
Enable packages for completion globally, e.g.,
$ eselect bashcomp enable --globally eix eselect genlop gentoo subversion
Bash needs to be restarted before the changes will take effect.