zsh-workers
 help / color / mirror / code / Atom feed
* HIST_IGNORE_DUPS also ignores command lines that differ by a space between quotes
@ 2024-03-13 12:38 Vincent Lefevre
  2024-03-14  5:13 ` Bart Schaefer
  0 siblings, 1 reply; 14+ messages in thread
From: Vincent Lefevre @ 2024-03-13 12:38 UTC (permalink / raw)
  To: zsh-workers

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@vinc17.net> - 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)


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-03-21 10:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 12:38 HIST_IGNORE_DUPS also ignores command lines that differ by a space between quotes Vincent Lefevre
2024-03-14  5:13 ` Bart Schaefer
2024-03-15 12:53   ` Vincent Lefevre
2024-03-16 16:00     ` Bart Schaefer
2024-03-19 10:57       ` Vincent Lefevre
2024-03-19 11:08         ` Mikael Magnusson
2024-03-19 12:34           ` Vincent Lefevre
2024-03-20 17:46             ` Bart Schaefer
2024-03-20 17:48               ` Bart Schaefer
2024-03-20 23:48               ` Vincent Lefevre
2024-03-21  5:22               ` Jun T
2024-03-21  5:36                 ` Bart Schaefer
2024-03-21  9:41                   ` Jun T
2024-03-21 10:21                     ` Vincent Lefevre

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).