Skip to content

Instantly share code, notes, and snippets.

@matsubo
Created Apr 20, 2021
Embed
What would you like to do?

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