help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tokenize honoring quotes


From: Koichi Murase
Subject: Re: tokenize honoring quotes
Date: Sat, 6 Aug 2022 09:05:15 +0900

 2022年8月6日(土) 8:41 Robert E. Griffith <bobg@junga.com>:
> Its funny, when I try "history -d -1" in the script or even in my
> terminal I get an error. I even googled it to confirm that it should
> work and I tried several terminal windows. I have so many strange
> behavior to track down now (I am porting my stuff to ubuntu 22.04) I
> thought I would just let it go and I use "1".
>
>  1998  history
>  1999  history -d -1
>  2000  history
> $ echo $BASH_VERSION
> 5.0.17(1)-release
> $ history -d -1
> bash: history: -1: history position out of range
> $
>
> --BobG

Bash 5.0 seems to have a bug when the history number is larger than
HISTSIZE. It's fixed in Bash 5.1:

https://lists.gnu.org/archive/html/bug-bash/2021-02/msg00203.html

On 8/5/22 19:16, Koichi Murase wrote:
> This will remove the first history entry. Instead, « history -d -1 »
> (Bash 4.3+) can be used to remove the last entry. If you assume an

Let me correct myself, « history -d -1 » is available in Bash 5.0+.

--
Koichi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]