Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 17:59:00 GMT)

Oh My Zsh gets theme support

Posted by Mon, 31 Aug 2009 15:00:00 GMT

I just pushed a small change to Oh My Zsh, which gives it rudimentary support for themes. What I’m hoping to do is collect prompts from tons of people and make it simple for others to find a PROMPT that works well for them.

robbyrussell's oh-my-zsh at 2c9f74b5c3f6910e7c66601008e9ddd0444b70c7 - GitHub

As of right now, there are only three for you to choose from. So, please head over to github, fork Oh My Zsh, add your theme, and send a pull request. :-)

zsh /Users/robbyrussell/Projects/development/planetargon/brainstorm 2014 zsh

Once I get it merged in, we’ll get a screenshot of it added to the Oh My Zsh wiki. (see themes)

I know that many of you have some really sweet prompts configured as I got a lot of response with my post, Show me your and I’ll show you mine.

Spice up your Terminal with colored grep pattern results

Posted by Sat, 06 Oct 2007 17:43:00 GMT

Earlier, I came across a post by Garry Dolley, which he shows how to acheive colorized grep matches in bash. I recall having color matches when I used to use Linux on a daily basis as my primary work environment, but haven’t gotten around to setting this up on my MacBook, which is where I do almost all of my development work.


If you don’t already have colors, a grep in your terminal might look something like the following screenshot.

While, I have a very small output here, this gets much crazier when you’re using egrep across an entire project. It’s hard to scan through all of the results for the inline pattern matches.

So, taking Garry’s suggestion (for bash), I did something similar with my favorite shell, Z shell.

Add the following to your ~/.zshrc file to begin experimenting with the colors.

  export GREP_OPTIONS='--color=auto' 
  export GREP_COLOR='1;36'


With the new variables defined in my .zshrc, I can now start to see colors showing up in my grep results.

Pretty cool, huh?


To save you the trouble of trying tons of combinations yourself, which I suspect you’ll do anyways, here are some other variants.


If you change the first number in GREP_COLOR to 5, you’re matches will blink!

You’ll have to experiment with this yourself as I’m not going to make a video for you. ;-)

  export GREP_COLOR='5;35'

Inverted Colors

You can also invert the colors so that the background color changes on your pattern matches.

For example:

To achieve this, you can set the first number in GREP_COLOR to 7.

...and so much more

I decided to write a quick and ugly ruby script to iterate through the color combinations that I was trying.

Anyhow, I’ll leave you on that note. If you figure out how to do any other fun things with grep colors, do let me know. :-)