Do you often start a long-running command like an import or test suite, switch app to do something else, and promptly forget about the command? I do. This helps me unforget.
This is a shell function for the OS X Terminal that sits in your prompt. It uses AppleScript to check if the Terminal is in the background when the prompt is printed and notifies you with Growl.
ready_milord.sh and put
source ready_milord.sh somewhere after your prompt definition (PS1) in your
.bashrc or equivalent.
Here's the relevant bit from my .bashrc as an example:
PS1='\[\033[0;36m\].----[\ \[\033[0;32m\] \u@\[\033[7m\]\h\[\033[0m\]\ \[\033[0;36m\] ]----[\ \[\033[0;32m\] \w\ \[\033[0;36m\] ]\ $(__git_ps1 "\[\033[0;36m\]----[ \[\033[0;32m\]%s\[\033[0;36m\] ]")\ \n\ \[\033[0;36m\]‛-- $\ \[\033[0m\] ' source ~/.ready_milord.sh
Sometimes the AppleScript takes a long time to run and so blocks execution for a second or two. It can be a bit annoying, but you learn to live with it.
Baconright 2012 Kim Ahlström, email@example.com