* bug in 'repeat' syntax (zsh-3.0.7)
@ 2000-12-05 15:26 Dominik Vogt
2000-12-05 17:00 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Vogt @ 2000-12-05 15:26 UTC (permalink / raw)
To: zsh-workers
There is a minor bug in the parsing of the 'repeat' command in
zsh-3.0.7. The repeat count can be any token you like, as long
as it starts with a digit. For example,
repeat 9lskedhgflish echo foobar
works with a reapeat count of 9. Not sure if this was intended.
Bye
Dominik ^_^ ^_^
--
Dominik Vogt, dominik.vogt@gmx.de
Reply-To: dominik.vogt@gmx.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bug in 'repeat' syntax (zsh-3.0.7)
2000-12-05 15:26 bug in 'repeat' syntax (zsh-3.0.7) Dominik Vogt
@ 2000-12-05 17:00 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-12-05 17:00 UTC (permalink / raw)
To: dominik.vogt, zsh-workers
On Dec 5, 4:26pm, Dominik Vogt wrote:
} Subject: bug in 'repeat' syntax (zsh-3.0.7)
}
} There is a minor bug in the parsing of the 'repeat' command in
} zsh-3.0.7. The repeat count can be any token you like, as long
} as it starts with a digit.
That's happening because the word following the `repeat' keyword is
parsed as a zsh "string" token, meaning it can be a variable reference,
a command or process substitution, a glob, etc. Most of those don't
make sense, of course, but a variable reference does.
Zsh then expands the string token and calls atoi() on the result. One
side effect of atoi() is that it ignores trailing garbage after the
integer. There are several places where this happens, e.g.
kill -2foo $!
will send SIGINT to the most recent child process.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-05 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-05 15:26 bug in 'repeat' syntax (zsh-3.0.7) Dominik Vogt
2000-12-05 17:00 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).