Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: REPORTMEMORY
On Thu, 9 Jun 2016 11:15:32 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> Note you need to
> add output of %M to TIMEFMT by hand --- I've documented this.
I'm wondering about the patch below.
The trouble is there are two completely different sorts of "concerned"
user.
"It is OUTRAGEOUS that zsh DOES NOT SUPPORT ADVANCED FEATURES BY
DEFAULT. Any alternative opinion is INCONCEIVABLE. Froth, gibber."
"It is OUTRAGEOUS that zsh keeps being modified to support NEWER
FEATURES when ANY RIGHT THINKING PERSON can see it does far too much
already. Froth, gibber."
(If you see what I mean.)
Strictly speaking I think we need wait3 as well as getrusage for this to
work seamlessly --- but the changes I've made are at least compatible
with how printtime() is written.
pws
diff --git a/Src/zsh_system.h b/Src/zsh_system.h
index 17c4c64..888035f 100644
--- a/Src/zsh_system.h
+++ b/Src/zsh_system.h
@@ -438,7 +438,12 @@ struct timezone {
#endif
#define DEFAULT_WORDCHARS "*?_-.[]~=/&;!#$%^(){}<>"
+#ifdef HAVE_GETRUSAGE
+#define DEFAULT_TIMEFMT \
+ "%J %U user %S system %P cpu %*E total, max RSS %M MB"
+#else
#define DEFAULT_TIMEFMT "%J %U user %S system %P cpu %*E total"
+#endif
/* Posix getpgrp takes no argument, while the BSD version *
* takes the process ID as an argument */
Messages sorted by:
Reverse Date,
Date,
Thread,
Author