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

RE: PATCH: Add jobdirs association to parameter module



Andrej Borsenkow wrote:

> > 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.
> >
> 
> I do not think it is a problem. We already have a lot of modifiers that are
> valid only inside of ${...} So, we could just as well state, that ${.x.y.z}
> refers to object z defined in namespace .x.y.
> 
> As long as .x.y.z=foo and typeset .x.y.z work - I think, this restriction is
> acceptable.

Well, if someone wants to see if he can find any problems with this,
it would be the patch below...

Note to maintainers: dunno if this should be applied right now, maybe
there are problems I don't see.

And if we find no problems or the solutions for them, we should of
course also change the docs. And decide about the standard way to form 
the namespace: `.<module>.<param>' or `<module>.<param>' or
`.zsh.<module>.<param>' or `zsh.<module>.<param>' or ... (I know that
you know that -- I just wanted to write them down to be able to have a 
look at them to find out which one I like the most; still don't know;
the ones with the dot at the beginning look a bit zstyle'ish, don't
they? the ones with the `zsh' are a bit longish... hm).


Bye
 Sven

diff -ru ../z.old/Src/utils.c Src/utils.c
--- ../z.old/Src/utils.c	Tue Dec 14 14:13:35 1999
+++ Src/utils.c	Tue Dec 14 14:22:20 1999
@@ -2234,6 +2234,7 @@
 	typtab[t0] = typtab[t0 - 'a' + 'A'] = IALPHA | IALNUM | IIDENT | IUSER | IWORD;
     for (t0 = 0240; t0 != 0400; t0++)
 	typtab[t0] = IALPHA | IALNUM | IIDENT | IUSER | IWORD;
+    typtab['.'] |= IIDENT;
     typtab['_'] = IIDENT | IUSER;
     typtab['-'] = IUSER;
     typtab[' '] |= IBLANK | INBLANK;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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