For last couple of days, I have been looking for solutions to make stlying my bash easier. So, first a screenshot of the effort:
<img class="size-full wp-image-703" title="bash style" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/a.jpg" alt="bash style" width="511" height="332" />
I was looking for the simplest solutions to do this. So, I installed two packages to make my life easier : bashstyle and fortune.
sudo yum install fortune\*
For bash-style you can download the source files <a href="http://www.nanolx.org/bashstyle-ng/" target="_blank">here. Download the file, then do the following:
su -c “make install” [ or ] sudo make install
So once all these are installed, we need to make a little correction with the bashstyle. The bash-completion in bashstyle is old and hence does not work well until some changes are done. Run the below command to correct the bash completion:
sudo mv /usr/share/bashstyle-ng/system/misc/completion-rc /usr/share/bashstyle-ng/system/misc/completion-rc.bak
sudo ln -s /etc/bash_completion /usr/share/bashstyle-ng/system/misc/completion-rc
This will fix the problem with the bash completion created by the bashstyle. Now, we will make the changes. Open up .bashrc and add fortune in the end of the file.
Run bashstyle now to style your bash. The GUI for the styling does not look so good but the functionality is quite impressive. So happy styling.