Add test for MacOSX notifications

This commit is contained in:
Michael Aquilina 2019-07-15 17:04:56 +01:00
parent 241f33ba26
commit 41117d1b45
No known key found for this signature in database
GPG key ID: 636066730B056BD1
2 changed files with 27 additions and 6 deletions

View file

@ -23,7 +23,7 @@ function _auto_notify_message() {
text="$(echo -e "\"$command\" has completed\n(Total time: $elapsed seconds)")"
platform="$(uname)"
if [[ "$platform" = "Linux" ]]; then
if [[ "$platform" == "Linux" ]]; then
notify-send "$text"
elif [[ "$platform" == "Darwin" ]]; then
osascript -e "display notification \"$text\" with title \"Command Completed\""
@ -75,4 +75,5 @@ function enable_auto_notify() {
}
autoload -Uz add-zsh-hook
enable_auto_notify