Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Crash with "fc -I" and/or zshaddhistory hook
- X-seq: zsh-workers 32892
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Crash with "fc -I" and/or zshaddhistory hook
- Date: Sun, 20 Jul 2014 11:20:29 -0700
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I was fiddling with this:
zshaddhistory() { return 2 }
precmd() { [[ $? != 127 ]] && fc -I }
(yes, that's a typo, I meant -AI)
HISTSIZE=10 SAVEHIST=10 HISTFILE=/tmp/testhist
I got
precmd:fc: no such event: 10
and was confused (because I hadn't noticed the typo) so I hit enter several
times, eventually typed an actual command, and
precmd:fc: no such event: 10
torch%
precmd:fc: no such event: 10
torch%
precmd:fc: no such event: 10
torch%
precmd:fc: no such event: 10
torch% echo foo
*** glibc detected *** double free or corruption (fasttop): 0x08a71a90 ***
zsh: abort (core dumped) Src/zsh -f
I sort of suspect the problem is related to the history being completely
empty because zshaddhistory always returns 2, but why was "fc -I" trying
to select an event rather than just giving an error?
--
Barton E. Schaefer
Messages sorted by:
Reverse Date,
Date,
Thread,
Author