Bash Completition on Gentoo

gentoo.gif

Here’s how to get a personalized and satisfactory completion on Gentoo installations..

First of all you need an use flag set widely in your system so that every software you are going to emerge (or re-emerge) if is capable will be added to your competition choices. To do so just open our magic make.conf with your favourite editor (I use vim, you can use emacs, nano, pico…i don’t really care about wars)

# vim /etc/make.conf

then find the USE variable and add inside it the string

bash-completion

Now you have the option to re-emerge all previously installed programs that have bash-completition USE flag. To do so just do

# emerge -a --newuse world

Right now you got the correct completitions available but to use them you need to install the bash completition ebuild so…

# emerge -avtD app-shells/bash-completion app-shells/gentoo-bashcomp

After emerging the ELOG will tell you to add a string to your .bashrc to enable it. So for each user you want to enable bash completition just edit their own .bashrc.

$ vim ~/.bashrc

Obviously you can do it for root account too (for emerge f.e.)

# vim /root/.bashrc

Right now you got it configured but no program is really affecting your bash shell. To do so I suggest you to use eselect (if you don’t have it just emerge it).

Fist of all use eselect to list all your available programs

# eselect bashcomp list

Then just choose wisely the programs you would like to add and insert them using their ID (the number beetween squares [] ).

# eselect bashcomp enable 1

Done! I usually like adding just a few completition like the emerge one (called gentoo, it adds other completitions then emerge alone) , subversion and git…

Related Posts

Comments are closed.