On 10/30/2012 05:37:40 PM, Felix Janda wrote:
On 10/28/12 at 01:04pm, Rob Landley wrote:
> > Posix specifies an -m option for wc, which toybox does
> > not implement. Should there be a test for this, too?
>
> That's internationalization support, which I haven't implemented
yet.
>
> I think toybox should support utf-8, but am not as interested in
> multiple translations and date formats and such. (Those belong at
the
> GUI/X11 level.)
Ok.
I note that adding utf-8 support to wc might be an interesting small
project. It's basically mbrtowc() and possibly with wcswidth() on the
result. (I'd have to check the definition of -m to see if they want
characters output or character positions output).
If not, I should get around to it before too long. :)
> > Why do the scripts actually use bash?
>
> The tl;dr version is "dash was a mistake on Ubuntu's part".
>
> [...]
>
> Toybox's built in shell is not attempting to duplicate dash. It's
doing
> a posix shell and then adding the bash extensions that make sense.
>
> Rob
Thanks for the interesting read. Skimming testing.sh I see that it
uses
bash extensions and therefore each test script should be executed by
bash.
Presumably, the extensions used in testing.sh belong to the (not yet
well-
defined) set of sane extensions to be implemented in toybox's sh at
some
point?
I'm interested in defining what those extensions are, but it's really
data collection. I know that I use <(command) and >(command), the
{curly,bracket} stuff, and pipefail. Several other things are synonyms:
$[1+2] is more or less $((1+2)), saying "function" before a function
definition is a NOP...
Aboriginal linux is building bash 2.05b, because last I checked busybox
ash couldn't build LFS. (This may have changed, I haven't rechecked in
a while.) But most packages I tried didn't need the bash stuff
introduced in 3.x or 4.x. Then again, I know this version of bash is
too old to run gentoo's portage package manager (which uses newer bash
features: some quoting rule changed, and it uses the ~= regex thing).
At one point I patched portage to work with older bash, but that's
pretty stale.
I'd like to get toysh to run portage, the aboriginal linux build, and
make it through linux from scratch (what are they up to, 7.2? I've got
an automated 6.8 build that needs updating...)
Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net