t413 / zsh-background-notify

cross-platform background notifications for long running commands!
93 stars 14 forks source link

False MacOS recognition when gem `terminal-notifier` is installed #20

Open g-pavlik opened 7 years ago

g-pavlik commented 7 years ago

I'm on ubuntu

4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

and I have terminal-notifier installed (it's required in on pf the projects) and

hash terminal-notifier 2>/dev/null

returns zero, falsely recognizing it as working command when

terminal-notifier 2>/dev/null

returns true.

The fix would be to get rid of hash usage, or moving if testing for terminal-notifier to the bottom of the if..else block. (Or something else?)