[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: |
Chet Ramey |
Subject: |
Re: history -s from inside function replaces last command rather than adding to it |
Date: |
Sat, 14 Dec 2024 13:46:26 -0500 |
User-agent: |
Mozilla Thunderbird |
On 12/13/24 6:03 PM, Bug Maybefound wrote:
Bash Version: 5.2
Patch Level: 37
Release Status: release
Description:
If I make a function that does history -s whatever, that seems to be put in
the history instead of the function call rather than along with it.
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'.
--
``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/
OpenPGP_signature.asc
Description: OpenPGP digital signature
- 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 <=
- 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, 2024/12/17
- Re: history -s from inside function replaces last command rather than adding to it, Chet Ramey, 2024/12/18