Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: db module
- X-seq: zsh-workers 17779
- From: Clint Adams <clint@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: db module
- Date: Sun, 6 Oct 2002 13:03:53 -0400
- Cc: Zsh workers <zsh-workers@xxxxxxxxxx>
- In-reply-to: <1021006164658.ZM11928@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E17w1iC-00012d-00@xxxxxxxxxxxxxxxxxx> <20021006053229.GA14350@xxxxxxxx> <20021006122451.GV24160@xxxxxxxxxxxxxxxxxxxxx> <1021006164658.ZM11928@xxxxxxxxxxxxxxxxxxxxxxx>
> It would seem to me that all of this stuff can be accomplished by the
> equivalent of ksh discipline functions (plus, in the DB case, a module
> to do the actual database access). Rather than implementing each of
> these things as different typeset variants, we should work on adding
> discipline functions.
So, if I grasp the concept correctly, one could do something like
db.get() { .sh.value=$(db_get thisdb "$.sh.subscript"); }
print $db[key]
> (Was it Andrej who's working on a parameter code rewerite?)
Oliver, I thought. Maybe both of them.
> You mean "print $twice[2]", yes?
Yes.
> On Oct 6, 8:24am, Hans Dieter Pearcey wrote:
> } Subject: Re: db module
> }
> } However, if the function got an extra argument when an element was
> } assigned to, it could be pretty neat, e.g.:
> }
> } f() { [ "$2" ] && echo $2 > $1; cat $1 }
>
> I confess to having no idea what that's supposed to mean.
I think he's trying to say that var[5]=xyz would call $(f 5 xyz).
Only I don't know what the cat's about.
Using var.set() would seem much cleaner.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author