Improved Prompt

Posted on May 20, 2012

When spending a lot of time in a shell, it's crucial to have a good prompt (PS1). By default, Mac OS X's Bash prompt is pretty bland. The entire prompt is in a single color and has, in my opinion, akward formatting.

Default Mac OS X Bash Prompt

Luckily, it's quite easy to change around your prompt for it to be more suitable. By editing your .bash_profile located in your user's home directory, you can style your prompt to your liking. Even making the smallest changes can dramatically improve quick redability while in a shell.

Take a look at my prompt. It states the logged in user, followed by the machine name, and lastly the current directory. By having simple differences with color, I can quickly glance to see where I am.

My Bash Prompt

To use my PS1, add the following to your .bash_profile

	PS1='\[\e[0;32m\]\u@\h\[\e[m\] \[\e[1;34m\]\W\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'

If you're interested in exploring other available colors for your prompt, take a look at the wonder Arch Linux wiki. In a future post, we'll explore some helpful scripts to further extend your prompt.

Apple Business Feature

Posted on March 16, 2012

A couple of applications I've worked on for my day job are featured in a new "iPad in Business" video by Apple. Take a look at the profile of United Airlines on Apple's iPad in Business website.

Welcome

Posted on March 15, 2012

Greetings. After going quite a while without a blog I've finally decided to create one. You'll soon be able to find posts about software, entrepreneurship, and other random musings here.