Created
April 2, 2020 17:00
-
-
Save jpoz/3d5f062e47950bddd5ecf018b2520602 to your computer and use it in GitHub Desktop.
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
'$' () { | |
echo "📢 [${PWD##*/}] $*" | |
eval $* | |
if [[ $? -eq 0 ]] | |
then | |
announce "Success ${PWD##*/}" | |
else | |
announce "Error ${PWD##*/}" | |
fi | |
} | |
announce () { | |
say $1 & | |
disown | |
if ! type "$(terminal-notifier)" > /dev/null | |
then | |
terminal-notifier -message $1 -title $1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment