Last active
May 11, 2023 14:34
-
-
Save kevinmbeaulieu/f438ad1799d3eb241ba3f2a18f83b968 to your computer and use it in GitHub Desktop.
Command to display a notification on macOS
This file contains hidden or 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
| # Copy this function and paste into your `.zshrc`/`.bashrc` | |
| function notify () { | |
| if [ $# -ge 1 ] | |
| then | |
| osascript -e "display notification \"$1\" with title \"Terminal\"" | |
| else | |
| osascript -e "display notification \"Command finished.\" with title \"Terminal\"" | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment