bug-bash
[Top][All Lists]
Advanced

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

Re[2]: history -s from inside function replaces last command rather than


From: Bug Maybefound
Subject: Re[2]: history -s from inside function replaces last command rather than adding to it
Date: Tue, 17 Dec 2024 07:01:59 +0000
User-agent: eM_Client/10.0.3530.0

The second part was just recently added to the doc. Why wasn’t it there before?


------ Original Message ------
From "Chet Ramey" <chet.ramey@case.edu>
To "Dale R. Worley" <worley@alum.mit.edu>; bugbash@89vx.net; bug-bash@gnu.org
Cc chet.ramey@case.edu
Date 12/16/2024 4:46:21 PM
Subject Re: history -s from inside function replaces last command rather than adding to it

On 12/16/24 9:36 PM, Dale R. Worley wrote:
Chet Ramey <chet.ramey@case.edu> writes:
Yes:

          -s     Store the args in the history list  as  a  single  entry.
                 The  last  command  in the history list is removed before
                 adding the args.

That last command is usually `history -s args'.

What is the point of "history -s args", then?  What is it useful for?

To add arbitrary data to the history list, for whatever reason a user
likes. I think the documentation is fairly clear on that.

-- ``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]