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



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