Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
BUG: "zle reset-prompt" prints "n" when called from a trap
- X-seq: zsh-workers 45195
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: BUG: "zle reset-prompt" prints "n" when called from a trap
- Date: Thu, 2 Jan 2020 16:15:43 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Setup:
autoload -U compinit && compinit
zstyle ':completion:*' menu select
trap 'zle reset-prompt; return 130' INT
Now type:
grep --<TAB><CTRL-C>
It looks as expected after <TAB>:
adam% grep --
zsh: do you wish to see all 132 possibilities (44 lines)?
But not as expected after the following <CTRL-C>:
ndam% grep --
adam% grep --
Note "ndam" on the first line. `zle reset-prompt` has unexpectedly
printed "n" at the first column followed by line feed.
Expected output:
adam% grep --
This is the output I would get if I didn't trap SIGINT or didn't call
`zle reset-prompt` from the trap.
I haven't looked into why this is happening.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author