visionmedia/node-growl — pull request #45 by sukima (2014-09-09 21:09:43+00:00)
Title: Add 'exec' option for custom notifiers

Pass in an 'exec' option to `growl()` to use a custom command for notifications. It will append the message to the command unless you include a `%s` in the command string which is expanded to the message. 'title' is expanded to a `Title: ` prefix in the quoted message.

Also `%%s` will NOT expand but `%s` will (so it can be escaped if needed.

The hack isn't as clean as I'd like but it's kinda the way the original data structure was designed. Perhaps this one commit could segway to a more expressive API then it is at the moment.

To address issue #41 one could use this like so:

growl('test message', { exec: 'tmux display-message' });