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

Obscure positional-parameter assignment feature/bug



Consider:

% () { 03=foo; print -l $argv } 1 2 3 4
1
2
foo
4
%

Do we want to allow leading zeros in the "names" of positional
parameters?  I rather expect this was not intentional and it seems
unlikely anyone is relying on it.  On the other hand prohibiting it is
presently a mildly annoying special case.

Tangentially, reference to argv[03] or even say argv[2#011] bypasses
any such restriction because the subscript is interpreted as an
integer.




Messages sorted by: Reverse Date, Date, Thread, Author