Wednesday, April 18, 2012

Tip: Enable Bash completion on CentOS 6.2 / SL 6.2

Bash, GNU Bourne-Again SHell, can be made more useful through the use of the bash-completion which provides programmable completion for Bash.

The package is not available the CentOS or Scientific Linux official repositories, so to install it you'll need to setup a third-party repository such as RPMforge or EPEL; in alternative you can always download and install the rpm manually.
$ su
# yum install bash-completion
# source /etc/profile
Examples of usage in which [TAB] means a press of the TAB key:
$ man bas[TAB][TAB]
base base64 basename bash bashbub
blk [TAB][TAB]
blkid         blkiomon      blkparse      blkrawverify  blktrace
$ yum re[TAB][TAB]  
reinstall remove repolist resolvedep
$ yum info bas[TAB][TAB]  
basesystem.noarch bash-completion.noarch bash-doc.i686 bash.i686  
Once you enable shell completion you world... err.. your shell world... will change :)

1 comment:

Anonymous said...

Thank you.
Cloonn