I am running a long process on a remote shell. I would like to trigger a notification when the process is complete. This answer does not suffice, because the long command is on a remote server, so it cannot call terminal-notifier.
I can get close to my desired outcome by using an iTerm2 trigger. For example if I run the following on the remote server and set up an iTerm2 trigger for __FINISHED__:
./long_process && echo "\__FINISHED__"
This has the undesirable feature that every time I scroll back to this command in my editor or my code (I'm running code in an emacs shell), the notification triggers.
One solution might be some kind of text notification that iTerm2 will recognize, but that will not appear in an emacs scrollback buffer.