Skip to content

Instantly share code, notes, and snippets.

@wxactly
Last active March 16, 2016 18:50
Show Gist options
  • Save wxactly/a4e37eaf61c404cd0fcf to your computer and use it in GitHub Desktop.
Save wxactly/a4e37eaf61c404cd0fcf to your computer and use it in GitHub Desktop.
Trigger OSX notifications from iTerm2
# Paste into .zshrc, with or without the alias:
function notify() {
printf "\x1b]9;%s\x7" "$*"
}
alias n="notify"
# Usage:
# notify Testing 1 2 3
#
# Or after you hit ENTER to run a long command, just
# type notify[ENTER] and receive a notification when
# the command is complete!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment