Install terminal-notifier
$ gem install terminal-notifier
Then add a new function into your .bashrc or .zshrc
function watch {
$*
echo -n -e "\033[41m"
echo $* DONE
date
echo -n -e "\033[0m"
$(rvm @default ; echo $* DONE | terminal-notifier)
}The last line launches a sub-shell, switches to the correct Ruby and gemset and launches terminal-notifier. RVM is not required (just Ruby 1.9.3).
Now I can do something like:
$ watch rake run_a_really_long_test_suite