If I run the following command in Apple Script Editor directly,
display notification "Hello, world"
I can see a notification as expected
However if I tried to invoke it via command line:
osascript -e 'display notification "Hello, world"'
It turns out I am running it in a tmux session. If I just ran the command in my default shell, it works as expected.
How can I get it to work with tmux?
osascript
line works fine for me…brew install reattach-to-user-namespace
if you are running Homebrew) helps.