Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

History expansion surprisingly sets event designator



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