On 11/30/24 10:41 PM, Lawrence Velázquez wrote:
On Sat, Nov 30, 2024, at 9:36 PM, Dan Jacobson wrote:
We see for simple
$ history
output, there's no way to change the file it reads, at least with the
current (same PID) shell.

Why is "same PID" a requirement?  Why isn't something like this
sufficient?

        history_f() (
                history -c &&
                history -r -- "$1" &&
                history
        )
        history_f .bash_history_foobar

That *is* the `same PID' shell.

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to