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

前端 未结 7 1794
[愿得一人]
[愿得一人] 2020-12-12 13:00

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 switc

7条回答
  •  生来不讨喜
    2020-12-12 13:30

    You can also use terminal-notifier which use mac os system notifications. To install it via Home brew just:

    $ brew install terminal-notifier
    

    Then if you want to display notification when your job/process is done use something like this

    $  && echo 'Completed' | terminal-notifier -sound default
    

    And this display like this:

    You can also change sound and icon of notifications. More info in github repo: https://github.com/julienXX/terminal-notifier

提交回复
热议问题