Friday, 22 June 2012

OS X terminal alerts

Sometimes when I'm running a long command I want to be alerted when it's done, so I don't have to check the other window all the time to see if it's finished.

To do so, simply append printf '\a' to your command, like so:

sleep 5; printf '\a'

This will add a 'bell' character to the message, which will bounce the dock icon and add a little badge if it is out of focus, very useful!

No comments:

Post a Comment