aaron.harnly.net

Sharing the wealth: My dotfiles

It is the fashion these days to share your .bashrc, so I thought I’d do so.

Here is my .bashrc in all its glory.

And here is a typical prompt it produces:

The first little box there just displays the login information — whether I’m local or remote, and from which host. That’s handy if I’m bouncing between servers and have forgotten whether I’m connected to machine C via machine B, or directly from A, etc.

Also of interest there is an updated version of this MacOSXHints.com suggestion of mine, which lists available GNU screen sessions.

Some other little functions I use daily are pathappend, pathprepend, and try_export, which simply add a directory (if it exists) to the beginning or end of a given env variable, usually $PATH.

So, for example, I have these lines:

path_prepend $HOME/software/crossplatform/bin
try_export "/usr/local/java/java1.5" JAVA_HOME
try_export "/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/" JAVA_HOME

which I think makes for a much tidier way to conditionally set a variable depending on which platform I happen to be logged into. IMHO.

Anyway, enjoy.

Digg this     Create a del.icio.us Bookmark     Add to Newsvine

No Responses to “Sharing the wealth: My dotfiles”

No comments yet

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word