Skip to content

Instantly share code, notes, and snippets.

@martint
Last active August 29, 2015 14:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martint/fa04776d01eefaab0e45 to your computer and use it in GitHub Desktop.
Save martint/fa04776d01eefaab0e45 to your computer and use it in GitHub Desktop.
notify wrapper
# needs https://github.com/alloy/terminal-notifier
# brew install terminal-notifier
# to use, source this file or copy the code into your bashrc,
# then prefix your commands with "notify". E.g.,
#
# notify mvn clean install
#
notify() {
"$@"
local result=$?
local message=Succeeded
test $result -ne 0 && message=Failed
terminal-notifier -group "$1" -title "$*" -message "$message"
return $result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment