[git commit] hush: specially handle [[ - suppress globbing & multiword expansion

Mike Frysinger vapier at gentoo.org
Wed Jun 10 01:07:44 UTC 2009


On Tuesday 09 June 2009 17:17:07 Denys Vlasenko wrote:
> On Tue, Jun 9, 2009 at 9:21 PM, Mike Frysinger<vapier at gentoo.org> wrote:
> > On Tuesday 09 June 2009 12:40:52 Denys Vlasenko wrote:
> >> commit:
> >> http://git.busybox.net/busybox/commit/?id=9d617c44d2b1135d14b7dafd01a1d3
> >>992 293f4d9 branch:
> >> http://git.busybox.net/busybox/commit/?id=refs/heads/master
> >>
> >>
> >> It's a bashism, but is surprisingly easy to do and costs very little
> >> code.
> >
> > we dont want [[...]] because it implies a lot of extended operators that
> > only bash supports: pattern matching, regexes, etc...
>
> (pattern matching? I know only about &&, || and =~ inside [[ ]])

the rhs is always a pattern which is why it should be quoted to avoid 
accidental expansion in variables
[[ bab == *a* ]]

> I intend to be friendly even for bash-loving heretics :)

i dont have a problem with bash (i advocate it when writing development 
scripts), but i dont think it generally has a place on embedded systems.

> > if anything, there needs to be a nob to turn all the bashisms off
>
> I will make such a knob.

if there is a knob, then i say add all the bashisms to your hearts content
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090609/95caa149/attachment.pgp>


More information about the busybox mailing list