Created
April 10, 2020 21:11
-
-
Save eli-oat/7f2d03d49fb9756b7b2527843e1c5b90 to your computer and use it in GitHub Desktop.
macOS bash function to trigger an alert when a process completes
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
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