history -s dummy args
On Wed, Dec 18, 2024, 4:58 PM Dale R. Worley wrote:
> Chet Ramey 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
On 12/18/24 10:57 AM, Dale R. Worley wrote:
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 no
Chet Ramey 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
On 12/17/24 5:19 PM, Dale R. Worley wrote:
Chet Ramey 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 ar
Chet Ramey 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
al
On 12/17/24 12:48 PM, Bug Maybefound wrote:
I assumed it must be from a more recent bash than I have since mine doesn’t
have it:
The `help' builtin output isn't `the documentation'. It's intended as a
brief hint about builtins and some compound commands. The man page and
info doc are more compr
On Tue, Dec 17, 2024 at 17:48:15 +, Bug Maybefound wrote:
> I assumed it must be from a more recent bash than I have since mine doesn’t
> have it:
>
> $ help history
>
> -pperform history expansion on each ARG and display the result
> without storing it in the hi
single entry
If FILENAME is given, it is used as the history file. Otherwise,
-- Original Message --
From "Chet Ramey"
To "Bug Maybefound" ; bug-bash@gnu.org
Cc chet.ra...@case.edu
Date 12/17/2024 4:11:29 AM
Subject Re: history -s from inside function replaces
On 12/17/24 2:01 AM, Bug Maybefound wrote:
The second part was just recently added to the doc. Why wasn’t it there
before?
What does `recent' mean to you? The sentence about removing the last
command in the history list has been in the man page since bash-2.0,
in 1996, when `history'acquired t
de function replaces last command rather
than adding to it
On 12/16/24 9:36 PM, Dale R. Worley wrote:
Chet Ramey writes:
Yes:
-s Store the args in the history list as a single entry.
The last command in the history list is removed before
On Mon, Dec 16, 2024 at 21:46:21 -0500, Chet Ramey wrote:
> On 12/16/24 9:36 PM, Dale R. Worley wrote:
> > Chet Ramey writes:
> > > Yes:
> > >
> > > -s Store the args in the history list as a single entry.
> > > The last command in the history list is removed
On 12/16/24 9:36 PM, Dale R. Worley wrote:
Chet Ramey 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 a
Chet Ramey 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
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 arg
Configuration Information [Automatically generated, do not change]:
Machine: aarch64
OS: darwin21.6.0
Compiler: clang
Compilation CFLAGS: -DSSH_SOURCE_BASHRC
-DDEFAULT_LOADABLE_BUILTINS_PATH='/opt/homebrew/Cellar/bash/5.2.37/lib/b$
uname output: Darwin mini.home 21.6.0 Darwin Kernel Version 21.6.
15 matches
Mail list logo