Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: HIST_IGNORE_DUPS also ignores command lines that differ by a space between quotes
- X-seq: zsh-workers 52763
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: HIST_IGNORE_DUPS also ignores command lines that differ by a space between quotes
- Date: Fri, 15 Mar 2024 13:53:17 +0100
- Archived-at: <https://zsh.org/workers/52763>
- In-reply-to: <CAH+w=7aRd=J9onerixqEa+iSXL22++xPCA0kwWk5Y=mYgm9QPA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- References: <20240313123817.GA3492761@cventin.lip.ens-lyon.fr> <CAH+w=7aRd=J9onerixqEa+iSXL22++xPCA0kwWk5Y=mYgm9QPA@mail.gmail.com>
On 2024-03-13 22:13:09 -0700, Bart Schaefer wrote:
> On Wed, Mar 13, 2024 at 5:38 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >
> > With zsh 5.9, HIST_IGNORE_DUPS is buggy: it also ignores command lines
> > that differ by a space between (single or double) quotes.
>
> With zsh back to at least April 1, 2000 and probably sooner.
> Searching history with the ZLE widgets works the same way.
>
> Doing a full syntax analysis here would make it a lot more complicated
> and a lot slower.
I don't think you need to do a full syntax analysis. Isn't this just
related to tokenization (something like that)?
Note that spelling correction, which occurs *before* the line is put
in the history, detects quoted text and won't try to correct it. So
it seems that "quoted status" can be taken into account at that point.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author