Skip to content

Instantly share code, notes, and snippets.

@eli-oat

eli-oat/watch.sh

Created Apr 10, 2020
Embed
What would you like to do?
macOS bash function to trigger an alert when a process completes
watch(){
cmd=$@ # Somehow interpolate $@ directly doesn't work.
$@ && tput bel && osascript -e "display notification \"Completed: $cmd\" with title \"╚(•⌂•)╝ Watch Alert\""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.