How do I make iTerm terminal notify me when a job/process is complete?

truth1ness picture truth1ness · May 3, 2015 · Viewed 30.1k times · Source

A notification center notification would be ideal but growl, bounce dock, sound, etc would be fine, too (or if this can only be done in Terminal.app I'd be willing to switch back). Is there an option somewhere in iTerm to turn on notifications or is it something I'm supposed to type at the end of a command in the terminal? If the latter, is it possible to add an alert once process has started (for example if I realize it's going to take longer than I initially expected, I'm bad at guessing).

Answer

Paschalis picture Paschalis · Jan 16, 2017

Notify on already running processes:

Shortcut: A or:

Edit -> Marks and Annotations -> Alerts -> Alert on next mark

Spooky eye! : iTerm will literally keep an eye (on the top right corner) of your terminal. Once the command is finished, it will contact the Notification Center.

Why?

Command was already launched, completion time was underestimated, and we don't want to cancel the command or wait for its completion. (i.e., brew update after a long time)

Requirements

iTerm: Shell Integration:

iTerm2 -> Install Shell Integration

Note that the integration will not show notifications until iTerm2 is restarted.