Skip to content

Instantly share code, notes, and snippets.

@matsubo
Created April 20, 2021 04:38
Show Gist options
  • Save matsubo/50fa103f31f81ddac7753059c8e0c1c5 to your computer and use it in GitHub Desktop.
Save matsubo/50fa103f31f81ddac7753059c8e0c1c5 to your computer and use it in GitHub Desktop.

Usage

"very long time task" | notify
function success
say "succeeded"
osascript -e 'display notification "success" with title "Succeeded"'
end
function failure
say "failed"
osascript -e 'display notification "failed" with title "Failed"'
end
function notify
if test $status = 0
success
else
failure
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment