[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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: |
Tue, 17 Dec 2024 17:19:08 -0500 |
Chet Ramey <chet.ramey@case.edu> writes:
>> 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.
To be more specific, it adds arbitrary data to the history list, but
also necessarily removes an entry from the history list. This is
exactly the combination you want when the user types "history -s foo bar
baz" at the prompt, 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?
Dale
- history -s from inside function replaces last command rather than adding to it, Bug Maybefound, 2024/12/13
- Re: history -s from inside function replaces last command rather than adding to it, Chet Ramey, 2024/12/14
- Re: history -s from inside function replaces last command rather than adding to it, Dale R. Worley, 2024/12/16
- Re: history -s from inside function replaces last command rather than adding to it, Chet Ramey, 2024/12/16
- Re: history -s from inside function replaces last command rather than adding to it, Greg Wooledge, 2024/12/16
- Re[2]: history -s from inside function replaces last command rather than adding to it, Bug Maybefound, 2024/12/17
- Re: history -s from inside function replaces last command rather than adding to it, Chet Ramey, 2024/12/17
- Re[2]: history -s from inside function replaces last command rather than adding to it, Bug Maybefound, 2024/12/17
- Re: history -s from inside function replaces last command rather than adding to it, Greg Wooledge, 2024/12/17
- Re: history -s from inside function replaces last command rather than adding to it, Chet Ramey, 2024/12/17
- Re: history -s from inside function replaces last command rather than adding to it,
Dale R. Worley <=
- Re: history -s from inside function replaces last command rather than adding to it, Chet Ramey, 2024/12/18
- Re: history -s from inside function replaces last command rather than adding to it, Dale R. Worley, 2024/12/18
- Re: history -s from inside function replaces last command rather than adding to it, Chet Ramey, 2024/12/18
- Re: history -s from inside function replaces last command rather than adding to it, microsuxxor, 2024/12/18