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

Re: db module



On Oct 6,  1:03pm, Clint Adams wrote:
}
} So, if I grasp the concept correctly, one could do something like
} 
} db.get() { .sh.value=$(db_get thisdb "$.sh.subscript"); }

Yes, except that, like e.g. the stat module's -A and -H options, I was
thinking that the name of the parameter to which to assign would be an
argument to the db_get function so that the $(...) would not be needed.

Either that, or db_get would always assign to .sh.value and would thus
only be callable from a discipline function.

} > } 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).

Ah.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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