Created
February 26, 2015 19:17
-
-
Save funkymonkeymonk/cf35fbffd9cedf308d72 to your computer and use it in GitHub Desktop.
A function for sending notifications from bash to the OSX notification center
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notify() { | |
body=${1-'Demo notification\nsyntax: notify "title" "body"'} | |
title=${2-'Terminal notification'} | |
osascript -e "display notification \"${body//\"/\\\"}\" with title \"${title//\"/\\\"}\"" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment