Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug in 'repeat' syntax (zsh-3.0.7)
- X-seq: zsh-workers 13239
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: dominik.vogt@xxxxxx, zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: bug in 'repeat' syntax (zsh-3.0.7)
- Date: Tue, 5 Dec 2000 17:00:40 +0000
- In-reply-to: <20001205162626.A9181@xxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20001205162626.A9181@xxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author