Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an equivalent of zsh's precmd for performing a function after a command has completed?

I'm looking for a way to send myself a notification for any process that takes over 60 seconds. Zsh has a great ability to print a summary of the resources used for each command if the command takes longer than the value set in REPORTTIME seconds. From what I can tell, the only available option is to print the format in TIMEFMT.

(More specifically, I'm looking to send myself a notification with if any process running in a detached tmux session takes over 60 seconds to complete.)

share|improve this question

closed as not a real question by MaQleod, Diogo, soandos, 8088, ChrisF Oct 3 '12 at 9:40

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Why was this closed? It seems useful and makes perfect sense to me. – Blacklight Shining Oct 6 '12 at 6:53
I agree, this is a good question and should not have been closed. – NorthIsUp Jan 29 '13 at 18:28
Seems like this similar question may answer it! – Brad Parks May 30 at 17:52

Browse other questions tagged .