I use the following in Bash. function notifyme() { MSG=${1:-'Terminal is done'} TITLE=${2:-"Done!"} osascript -e "display notification \"${MSG}\" with title \"${TITLE}\"" } I use it like: bin/start-unit-tests; notifyme
Here is an attempt at fish port:
function notifyme
set MSG $argv[1] "Terminal is done"
set TITLE $argv[2] "Done!"
osascript -e "display notification \"$MSG[1]\" with title \"$TITLE[1]\""
end
disclaimer: this is first fish function I ever write so might not be the best way to do default values; I'm using hack from https://unix.stackexchange.com/a/88682