Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Notification of time a command took



> This seems to be a useful feature, and since zsh has the union of all
> features of all shells, surely it is possible in zsh, too.
You're right.  :-)

man zshparam

...
       REPORTTIME
              If  nonnegative,  commands whose combined user and system execution
              times (measured in seconds) are greater than this value have timing
              statistics printed for them.
...

So:

condor:~>grep -i time .zshrc
# show process statistics if cpu time is > 5 seconds
export REPORTTIME=5

Chau,
 Andy.

-- 
                              o      _     _         _
  ------- __o       __o      /\_   _ \\o  (_)\__/o  (_)          -o)
  ----- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/       /\\
  ---- (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_    _\_v
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 "You can't have everything.  Where would you put it?"   (Steven Wright)



Messages sorted by: Reverse Date, Date, Thread, Author