Skip to content

Instantly share code, notes, and snippets.

@indianburger
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indianburger/e98dfd871fed7f43bf65 to your computer and use it in GitHub Desktop.
Save indianburger/e98dfd871fed7f43bf65 to your computer and use it in GitHub Desktop.
notify after long running shell command
# 1. brew install terminal-notifier
# 2. Add this to your .bash_profile or .zshrc or wherever you shove your shell aliases
function ntfy() {
terminal-notifier -message "Completed with exit code $?"
}
#3. Use it. Use semicolon, not && so that it'll work with failed commands. E.g.
mvn clean test; ntfy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment