elvish-modules
elvish-modules copied to clipboard
long-running-notifications should use the `edit:after-command` hook
This question was posed by @dcuadrado on IM an hour ago:
in the notifier is there a way to know if the process failed? I'd like it to say something out loud if the command failed
The answer is, no, given the current implementation. However, if the implementation were changed to use the edit:after-command hook introduced by commit https://github.com/elves/elvish/commit/e2f810048ec3e4bdcf4c57ae9cee87085236532f it could both report sub-second durations and the status of the command; i.e., whether or not it failed and if it failed how it failed.
Good idea. I don't have a lot of time at the moment to work on this, but PRs are welcome 😊