Alex Kotliarskyi wrote a great little script to show OS X desktop notifications when a long-running terminal command finishes (and is not in focus).
Making it work with a Vagrant virtual machine turned out to be straightforward. These instructions assume zsh as shell, bash might work similarly.
- Following Alex's instructions, install the notifyme script on OS X, in e.g.
~/bin/notifyme(assuming ~/bin is in $PATH, remember tochmod u+x notifyme) - (Vagrant) Install Ruby on the VM:
sudo apt-get install ruby - (OS X) Install the vagrant-notify plugin:
vagrant plugin install vagrant-notify - (OS X) Restart the virtual machine:
vagrant halt&vagrant up - (OS X) Alias our script under a name which the plugin knows:
ln -s ~/bin/notifyme ~/bin/notify-send - (Vagrant) Append to the end of the
~/.zshrcin your Vagrant box: