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

Re: inconsistency of invalid identifier error messages



On Wed, Nov 12, 2008 at 02:12:13PM +0000, Peter Stephenson wrote:
[...]
> Hmmm... "-" *is* an identifier if $- is a parameter.  Maybe the test
> needs fixing.  However, the parameter is readonly, and readonly specials
> can't be made writeable, so a simple local fix would be to test if the
> parameter existed despite the failure of the identifier test and report an
> error if it was readonly.  Same with "?".
[...]

And "#", "!", "$"?

What about "@" and "*"? You can do read 'argv[*]' but not read
'*'.

Also note that one can do 1=12, or "read 1" but not (( 1 = 12 ))
(though you can do (( argv[1] = 12 )) but it's probably a good
thing.

-- 
Stéphane



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