Ruby Xocolatl

Ruby, Cocoa, Mac OS X and things of my not so exciting life.

'Command Done' Notification With Zsh and Growl

images

The little banner in bottom of the screen in this image shows what I see when a command has finished (for peace of mind, only for the ones that have been running for at least 5 seconds).

Most of the time I find myself running commands that take 1-5 minutes to complete and you know, I am not going to just stare at the screen waiting for it to finish! Then my mind starts wandering in other things that may be productive but also take my focus out of the problem I’m solving at that moment.

You know what I’m talking about, you start looking at your emails, other tickets, problems in SPOJ, your score(and possibly taking revenge) at Fight Code or my favorite: Prismatic (no, no one looks at his facebook while working, right?).

So, tired of finding out that the command I ran one hour ago has now finished and realizing that I have no clue what I was doing when I pushed that to my personal To-Do stack (because lists are so FIFO, ugh!), I added this little script to my zsh configuration.

And I can customize the style of the growl notification when it fails:

images

Ain’t it cool?

Comments