Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
History expansion surprisingly sets event designator
- X-seq: zsh-workers 41235
- From: Leah Neukirchen <leah@xxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: History expansion surprisingly sets event designator
- Date: Tue, 06 Jun 2017 17:50:03 +0200
- 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
Hi,
on #zsh we discovered:
zsh 5.3.1 (x86_64-unknown-linux-gnu)
zsh-5.3.1-0-g06b1b7a (and zsh-5.3.1-204-g62c4169, via danielsh)
% zsh -f
juno% printf a b c
a%
juno% echo x y z
x y z
juno% echo !printf:2<TAB><DEL>!:3<RET>
c
The first tab expansion will correctly expand to "b", but it changes
the event designator to the printf-line, resulting in !:3 expanding to "c",
while the typed in line "echo !:3" itself would refer to the previous
line, the echo-line, and should result in "z".
(Same for tab-expanding the second history reference.)
Pressing ^U will not reset this, but pressing ^C will.
thx,
--
Leah Neukirchen <leah@xxxxxxxx> http://leah.zone
Messages sorted by:
Reverse Date,
Date,
Thread,
Author