zsh-workers
 help / color / mirror / Atom feed
* History not deduplicated when zsh is killed by SIGHUP
@ 2020-12-05 10:04 Robert Cegliński
  0 siblings, 0 replies; only message in thread
From: Robert Cegliński @ 2020-12-05 10:04 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

Hello,
I believe I discovered an issue with saving the history file. Here's a
minimal reproducer:

~ ❯ mkdir /tmp/zsh-repro
~ ❯ print
"HISTFILE=/tmp/zsh-repro/histfile;HISTSIZE=100;SAVEHIST=100;setopt
hist_ignore_all_dups" > /tmp/zsh-repro/.zshrc
~ ❯ ZDOTDIR=/tmp/zsh-repro zsh
rcarch% ls >/dev/null
rcarch% exit
~ ❯ ZDOTDIR=/tmp/zsh-repro zsh
rcarch% ls >/dev/null          # scroll up 2 times
rcarch% kill -SIGHUP $$    # or just close the terminal
~ ❯ cat /tmp/zsh-repro/histfile
ls >/dev/null
exit
ls >/dev/null
kill -SIGHUP $$

If we launch zsh again and scroll up the history, we will receive duplicate
entries.

OS: Arch Linux
zsh: 5.8, also reproducible on current master

---
Robert

[-- Attachment #2: Type: text/html, Size: 951 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-05 10:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 10:04 History not deduplicated when zsh is killed by SIGHUP Robert Cegliński

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git