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

Re: PATCH: Add jobdirs association to parameter module

Peter Stephenson wrote:

> ...
> It's a shame we didn't have more specific names for parameters, since the
> parameter module is quiet heavily used in completion, so there is quite a
> lot of name space pollution.  They stop being special if made local, but
> it's still a problem.  The ksh mechanism ${.param.jobdirs} would be
> excellent for this.

When I last added parameters to it, I asked if I should rename them to 
`z...' -- we decided against that.

I agree that it would be nice to have this cleaner so I just tried to 
allow dots in parameter names by simply adding `typtab['.'] |= IIDENT;'
to inittyptab(). It /seems/ to work, only `$.a.b' doesn't (but
`${.a.b}' does), haven't found the place where it fails yet -- mainly
because I haven't really searched for it.

So, can anyone think of a good reason why we shouldn't do that? Like
Peter (at least I think Peter meant that) I prefer the solution with
the dots over the solution with just prepending a `z' before every
parameter name. It's clean, it's extensible...


Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

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