Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15573

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

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: [FR] save command times and exit status in history automatically
Date Thu, 7 Nov 2019 15:09:00 -0500
Lines 21
Approved bug-bash@gnu.org
Message-ID <mailman.847.1573157347.13325.bug-bash@gnu.org> (permalink)
References <CAKOZuevfhS7veH9+GSc=8StpgrA_vy59Y2fYYGhMDk0OPZb69Q@mail.gmail.com> <8e19b0fc-4183-90fa-b067-9da636998d6f@case.edu>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1573157347 9449 209.51.188.17 (7 Nov 2019 20:09:07 GMT)
X-Complaints-To action@cs.stanford.edu
Cc chet.ramey@case.edu
To Daniel Colascione <dancol@google.com>, "bash.bug list" <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1573157341; bh=7E+ikd/MvXL/qEf3I+oPULDMKNEjntHV42Yx4JZoAws=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=StlCHmnHGAhOJ5v/cHG12PKqtqcc1qW3P1pFiESlrkcFbWWz4c8uuM6bwZpYn7XQmn TPPFMDgAIlkfY3bW98r3YON7+AxUbgTC42USbIGqUZKp/Ifx8OjRmp2de0jFefIBn8W lmRDDE91heS4V0EhQunAWko70IgkuMEUlrvJDzzbr+DNJ9iECht/b2ohA1RxDfFrfmv FDm7bGsqfNGYy1iZ3AxUJO+wZaHunEKVNi0gmxyKQr6ntfIhqHr8NWII9JjTMrqh8HK AI2W5G4hiSV3LJD+q4KzRbitS6KyiTOovdfCP8evqsoR7CPGvuHJAzO9q7IHJ+gD9/T 5az+bj6Q==
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1573157340; bh=QOOZ6wa0aXaqnZGdsrOnVHhqux5U/RqL8BJO+5Krek4=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=QvSRH1UatEwuMZpW3HNEY1eMGKZmt2wO624Yz6D0j+gP4bBz3ep13lGAI11XU4A6nI uSEj85Yf6BYz1xTlonbWKnFx03jA09ZtndpJNQ9YjRmX35TiwMVDycVOvJZoGhPYxla bB0jKjnyOCAwjGJPlXKWdy0wIwS4NIGquJusf5Q3I4Q5P0uWppf30+ZCJFhaMoeCJwz YEnijKCrpLw44vltOLVPw4pqB1CmqBYNO8qmQzVgyhTkW35MG9Ma1iEy2d7TYoug+oy LdrEYWX8jgnlRyfj5b5/xhHmCO+QzN4qYuJGRsFB69F4BcV1h2rU3MR3QDA8ryGbvxx daApq7Yw==
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.2.1
In-Reply-To <CAKOZuevfhS7veH9+GSc=8StpgrA_vy59Y2fYYGhMDk0OPZb69Q@mail.gmail.com>
Content-Language en-US
X-Junkmail-Status score=7/90, host=mpv3-2015.case.edu
X-Junkmail-PrAS-Raw score=7/90, refid=2.7.2:2019.11.7.195417:17:7.944, ip=, rules=DKIM_SIGNATURE, __HAS_REPLYTO, __HAS_CC_HDR, __SUBJ_REPLY, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_REFERENCES, __REFERENCES, __HAS_FROM, FROM_EDU_TLD, __HAS_MSGID, __SANE_MSGID, DATE_TZ_NA, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC1, __FROM_DOMAIN_IN_ANY_CC2, __REPLYTO_SAMEAS_FROM_DOMAIN, __DKIM_ALIGNS_1, __DKIM_ALIGNS_2, __ANY_URI, __URI_WITH_PATH, __URI_NO_WWW, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, __BODY_NO_MAILTO, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_800_899, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, DKIM_ALIGNS, BODY_SIZE_5000_LESS, IN_REP_TO, MSG_THREAD, [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy]
X-Received-From 129.22.103.194
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <8e19b0fc-4183-90fa-b067-9da636998d6f@case.edu>
X-Mailman-Original-References <CAKOZuevfhS7veH9+GSc=8StpgrA_vy59Y2fYYGhMDk0OPZb69Q@mail.gmail.com>
Xref csiph.com gnu.bash.bug:15573

Show key headers only | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: [FR] save command times and exit status in history automatically Chet Ramey <chet.ramey@case.edu> - 2019-11-07 15:09 -0500

csiph-web