[Toybox] printenv -0

enh enh at google.com
Tue Nov 17 12:40:20 PST 2020


oh: `  if (toys.optflags) delim = 0;` yeah, that would do it, and is
presumably the "cheating" you mentioned :-)

On Tue, Nov 17, 2020 at 12:00 PM enh <enh at google.com> wrote:
>
> yeah, works for me. although i don't understand _why_ that works --- i
> thought the long name had to come after the corresponding short name?
>
> new tests attached.
>
> On Tue, Nov 17, 2020 at 11:50 AM Rob Landley <rob at landley.net> wrote:
> >
> > On 11/17/20 12:06 PM, enh via Toybox wrote:
> > > https://github.com/landley/toybox/commit/52bbc1e0a410b44a926b04aaae3b00f9f50da81e
> > > seems to have broken `printenv -0`. (`printenv --null` still works.)
> > >
> > > /tmp/toybox$ ./toybox printenv --null LOGNAME | xxd
> > > 00000000: 656e 6800                                enh.
> > > /tmp/toybox$ ./toybox printenv -0 LOGNAME | xxd
> > > printenv: Unknown option '0' (see "printenv --help")
> > >
> > > since printenv doesn't have other options, the workaround used in env
> > > doesn't seem to apply...
> >
> > Huh. (I need to fill out the test suite...)
> >
> > Fixed it by cheating. Try now?
> >
> > Thanks,
> >
> > Rob
> > _______________________________________________
> > Toybox mailing list
> > Toybox at lists.landley.net
> > http://lists.landley.net/listinfo.cgi/toybox-landley.net



More information about the Toybox mailing list