No brace expansion for ash?

Denys Vlasenko vda.linux at googlemail.com
Sun Jul 10 18:40:30 UTC 2011


On Sunday 10 July 2011 19:23, Chris Rees wrote:
> >> > With ash :
> >> >
> >> > # mkdir /tmp/{a,b,c}
> >> > # ls /tmp
> >> > {a,b,c}
> >> >
> >> >
> >> > With hush :
> >> >
> >> > # mkdir /tmp/{a,b,c}
> >> > # ls /tmp
> >> > a  b  c
> >> >
> >> >
> >> > Brace expansion works in hush but not in ash.
> >>
> >> It shouldn't work in ash, as Denys said. It's a bashism.
> >
> > I didn't say it should not, I said it doesn't work.
> >
> > IOW: there is no policy decision to never ever implement
> > brace expansion in ash, it's just not implemented right now.
> >
> 
> So... do we need a separate ash and hush if ash doesn't need to be
> sh-compatible? I don't want to start a flamewar, but I think that
> portability is very important, and adding strange extensions means
> that people use code that breaks on other platforms, as you well know
> from the latest patches to gen_build.sh.

Bash is a standard Linux shell. Therefore bash compatibility hardly
can be qualified as "strange". You may not like it, but bash was
providing this functionality on Linux for years.

Bash compatibility in both ash and hush is optional, therefore
you are free to configure them to not have these "strange extensions".

However, you are not free to dictate other people that they must not
use these extensions. Because when you start telling other people
what they should do is where freedom ends and control freakism starts.

-- 
vda


More information about the busybox mailing list