3 ms·
Clever, but compiling and executing an AppleScript every single time any command finishes seems a bit overkill. Does zsh have a way to see how long the last co
by eridius 10y ago
Clever, but compiling and executing an AppleScript every single time any command finishes seems a bit overkill.
Does zsh have a way to see how long the last command took? You could at least have this only do the check if the command took more than one or two seconds. That would cut out a lot of the unnecessary checks.
- mayoff 10y agoYou could pre compile the script with osacompile if you want, but I wouldn't bother. I think checking the command runtime would be a mistake. If you expect the command to take a long time, and it finished in just a second or two, you probably want to be notified immediately rather than eventually wondering many minutes later why you weren't. And if you expect the command to take only a second or two, you are a lot less likely to be tabbing away, so you won't be notified anyway.