From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29405 invoked by alias); 9 Jun 2016 10:39:31 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21633 Received: (qmail 26946 invoked from network); 9 Jun 2016 10:39:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-AuditID: cbfec7f4-f796c6d000001486-44-5759475fd829 Date: Thu, 09 Jun 2016 11:39:24 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: Feature request: REPORTMEMORY Message-id: <20160609113924.185be892@pwslap01u.europe.root.pri> In-reply-to: <20160609111532.480f2810@pwslap01u.europe.root.pri> References: <20160609111532.480f2810@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsVy+t/xK7rx7pHhBk0rLC12nFzJ6MDoserg B6YAxigum5TUnMyy1CJ9uwSujPNdV5kKXnBV9M5ZxNLAuIeji5GTQ0LAROLE3p/sELaYxIV7 69m6GLk4hASWMkr8Wb6cCcKZxiTxeNVBVgjnNKPE9O0LoDJnGCUWHr7OBtLPIqAqcejhXhYQ m03AUGLqptmMILaIgKjE8hWbwXYIC2hJtD3sAIvzCthLvPh7CyzOKeAgsXtHNyuILSRQL3Hl eyMTiM0voC9x9e8nJoj77CVmXjkD1Sso8WPyPbBdzEAzN29rYoWw5SU2r3nLDDFHXeLG3d3s ExiFZyFpmYWkZRaSlgWMzKsYRVNLkwuKk9JzDfWKE3OLS/PS9ZLzczcxQgL6yw7GxcesDjEK cDAq8fBqpkSEC7EmlhVX5h5ilOBgVhLh/WEeGS7Em5JYWZValB9fVJqTWnyIUZqDRUmcd+6u 9yFCAumJJanZqakFqUUwWSYOTqkGRrG+9vP24Z+ddzNem3V1SoKNop/ElN2Oa763OsSvUuS7 /1UzZ7Gr2vqeW4yV6xqmLMrQ9wrcyXK99cDmyi/tM2ZdjPDeUHt8x6/G6XkfHZ2ehC1/2njR dOlpC16baadmTyhTWhnTsHg+S5LQ1iu5+2/1d16yKVyTf11uWkKBjOdPxv39v5fe8VZiKc5I NNRiLipOBABuJLEiZAIAAA== On Thu, 9 Jun 2016 11:15:32 +0100 Peter Stephenson 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 */