#!/bin/sh -e
#
# notification - with title term

if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
  printf '%s\n' "Usage: $(basename "$0") [message]"
  exit 0
fi

if [ "$#" -eq 0 ]; then
  while read -r input; do
    osascript -e "display notification \"${input}\" with title \"term\""
  done
else
  osascript -e "display notification \"$*\" with title \"term\""
fi
