bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FR] save command times and exit status in history automatically


From: Chet Ramey
Subject: Re: [FR] save command times and exit status in history automatically
Date: Thu, 7 Nov 2019 15:09:00 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.2.1

On 11/5/19 12:49 PM, Daniel Colascione wrote:
Right now, bash history saves only the command line actually executed.

This isn't quite the case. What it saves is the line returned from readline, before it's expanded or executed.

Why not also, optionally, save command execution times and exit
statuses? This information is practically free to collect.

Because by the time you gather this information, the command has already
been saved completely.

There have been various proposals to extend the timestamp with additional
information, but it's all data you can gather when the timestamp is saved
before the command is executed.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]