Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
HIST_IGNORE_DUPS also ignores command lines that differ by a space between quotes
- X-seq: zsh-workers 52747
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: HIST_IGNORE_DUPS also ignores command lines that differ by a space between quotes
- Date: Wed, 13 Mar 2024 13:38:17 +0100
- Archived-at: <https://zsh.org/workers/52747>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
With zsh 5.9, HIST_IGNORE_DUPS is buggy: it also ignores command lines
that differ by a space between (single or double) quotes.
For instance, with
setopt HIST_IGNORE_DUPS
echo " "
echo " "
(the first echo with only 1 space character between the quotes,
the second echo with 2 space characters between the quotes), zsh
keeps only the second one in the history.
Such spaces are significant, so that these command lines are not dups.
However, if the spaces are quoted, this problem does not occur:
echo \ .
echo \ \ .
--
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