Created
July 15, 2025 07:13
-
-
Save JasonkayZK/d5c4e3adadf3478ded5896becf01f08c to your computer and use it in GitHub Desktop.
Send system notify on MacOS after execute command.
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
| function notifyResult () { | |
| if [ $? -eq 0 ]; then | |
| osascript -e 'display notification "The command finished" with title "Success"' | |
| else | |
| osascript -e 'display notification "The command failed" with title "Failed"' | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment