Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: =?ISO-8859-1?Q?=C1ngel?= Newsgroups: gnu.bash.bug Subject: Re: [FR] save command times and exit status in history automatically Date: Fri, 08 Nov 2019 00:47:45 +0100 Lines: 19 Approved: bug-bash@gnu.org Message-ID: References: <8e19b0fc-4183-90fa-b067-9da636998d6f@case.edu> <1573170465.992.5.camel@16bits.net> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1573170474 15857 209.51.188.17 (7 Nov 2019 23:47:54 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 199.195.249.9 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1573170465.992.5.camel@16bits.net> X-Mailman-Original-References: <8e19b0fc-4183-90fa-b067-9da636998d6f@case.edu> Xref: csiph.com gnu.bash.bug:15576 On 2019-11-07 at 12:18 -0800, Daniel Colascione wrote: > Maybe what I > really want is something like $?, but instead of containing exit > status, it would contain information from a struct rusage (derived > from wait4) for the last command. Or something like that anyway. I would like having those variables, too. There was a related discussion some time ago, and a workaround was mentioned (using PROMPT_COMMAND and traps if I remember correctly), but I didn't like that approach too much. Would having such variables solve your needs? (using PROMPT_COMMAND to copy them into a file, perhaps). I would expect that storing the values from last wait4 would be much less intrusive than messing with history. Kind regards