[BusyBox] Working on "hush" extensions?

Larry Doolittle ldoolitt at recycle.lbl.gov
Thu Oct 25 15:18:49 UTC 2001


Wolfgang -

> is there any active development going on for the "hush" shell?

I have dreams of getting back to it someday, but I can tell that
someday is not very soon.

> Besides the missing loop constructs, there are some bug or at
> least "unexpected behaviour" in the way how quoting and variable
> substitution work.

I once started adding loop constructs, but stopped because they
would be useless given how variable substitution works.

> $ foo="bar;date"
> $ echo $foo
> bar
> Wed Oct 24 16:21:05 MEST 2001

That's the worst defect I've seen yet.

> $ foo=bar ; foo="$foo baz" ; echo $foo
> bar
> Wed Oct 24 16:22:02 MEST 2001

Very minor variation on the first.  Makes sense when you understand
that hush does all its variable substitutions on its first pass through
the line, so the value left over from the previous command is uses in
both $foo instances.  This is also what kills any possibility of a
useful "for" command.

> The problem is, that we are restricted (1) by memory  footprint,  and
> (2)   by  the  complexity  of  integrating  the  shell  into  PPCBoot
> if anybody is interested in patches and extensions ...

There are some nuggets of good design embedded in hush.  Unfortunately,
Bourne shell-compatible variable expansion is not one of them.  You are
certainly welcome to adapt and bug fix the code, and yes I would be
interested in seeing what you come up with.  Scratch your itch!
Hush will be better for it.

      - Larry





More information about the busybox mailing list