Skip to content

Instantly share code, notes, and snippets.

@kevinmbeaulieu
Last active May 11, 2023 14:34
Show Gist options
  • Select an option

  • Save kevinmbeaulieu/f438ad1799d3eb241ba3f2a18f83b968 to your computer and use it in GitHub Desktop.

Select an option

Save kevinmbeaulieu/f438ad1799d3eb241ba3f2a18f83b968 to your computer and use it in GitHub Desktop.
Command to display a notification on macOS
# Copy this function and paste into your `.zshrc`/`.bashrc`
function notify () {
if [ $# -ge 1 ]
then
osascript -e "display notification \"$1\" with title \"Terminal\""
else
osascript -e "display notification \"Command finished.\" with title \"Terminal\""
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment