Re: history -s from inside function replaces last command rather than ad
From:
Dale R. Worley
Subject:
Re: history -s from inside function replaces last command rather than adding to it
Date:
Wed, 18 Dec 2024 10:57:02 -0500
Chet Ramey <chet.ramey@case.edu> writes:
> On 12/17/24 5:19 PM, Dale R. Worley wrote:
> but it's tough to use programatically: How would
>> you code a function for use in scripts that adds an entry "foo bar baz"
>> to the history list without removing anything already on the history
>> list?
>
> Add a dummy command to the history, or expect the function call to be
> removed, or both?
Er... How do you add a dummy command to the history? Admittedly, I'm
not an expert in bash history processing, but I checked over the options
to "history" and none of them simply add something to the history.
Dale