On Thursday 30 September 2010 21:46, Rob Landley wrote:
> On Thursday 30 September 2010 13:14:37 Denys Vlasenko wrote:
> > On Thursday 30 September 2010 02:49, Rob Landley wrote:
> > > Bug #1: defconfig defaults to ash, but I thought hush was the future bash
> > > replacement, recipient of future development work, and ash was a dead
> > > end.
> >
> > No (at least not yet). ash is still the default shell.
>
> Understood, but I thought the strategy going forward was to expand hush into
> both a viable bash replacement and the one true busybox shell, not to try to
> scale ash up (or down) or to make it replace the other busybox shells.
>
> Changing the default to "the one with a future" seems like a reasonable first
> step.
Only when hush has no significant missing features compared to ash.
In 1.17.x, for example, it still has no history saving.
> (Making {file,file} curly bracket support work would be darn nice too,
> that's the biggest thing I miss. You can't even follow the Linux From
> Scratch
> build instructions without that...)
This is not easy. Consider three commands:
v='/bin/*'; echo $v
v='/bin/{a,b}*'; echo $v
echo /bin/{a,b}*
In the first case, unquoted $v is globbed *after* $v value is substituted,
and echo prints long list of filenames in /bin.
In the second case, echo prints just "/bin/{a,b}*"
In the third case, echo prints all filenames in /bin which start from a and b.
This means that unquoted $v expansion should protect (prefix with backslash)
brace expansion chars before they are fed into brace expansion machinery
(otherwise case 2 will break), BUT should not prefix glob chars.
In other words, we cannot simply extend glob chars to include expansion chars
and make corresponding changes to globbing logic: these two steps
(globbing and brace expansion) have inherently different rules.
Grep for HUSH_BRACE_EXP in hush.c to find relevant code.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox