Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[BUG] precmd not executed after Ctrl-C on some builtin
- X-seq: zsh-workers 54524
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [BUG] precmd not executed after Ctrl-C on some builtin
- Date: Wed, 13 May 2026 01:29:00 +0200
- Archived-at: <https://zsh.org/workers/54524>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
With zsh 5.9 and 5.9.0.3-test (1328291abbb80e90dc4473a4396daffb0e919827),
after interrupting some commands with Ctrl-C, precmd is not executed
before the prompt is displayed:
qaa% mkfifo fifo
qaa% precmd() { echo precmd > /dev/tty }
precmd
qaa% pwd
/home/vinc17
precmd
qaa% pwd >> fifo
^C%
qaa% read
^C%
precmd
qaa% { pwd >> fifo }
^C%
precmd
qaa%
The issue occurs with commands of the form "some_builtin >> fifo".
As seen with "read" (for which the issue does not occur), the issue
is not just that a builtin is blocking.
--
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 / Pascaline project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author