Simon Josefsson wrote:
> Jim Meyering <j...@meyering.net> writes:
>
>> Adding quotes is the solution, but you must then remove
>> one layer of backslash quoting:
>
> Of course, thank you.  What I was mostly surprised about was that nobody
> else had run into this.  I suppose bash doesn't trigger the problem.  So
> is this a problem with dash, or was the code assuming non-POSIX
> behaviour?

I didn't dig, since it's obviously a bug in that usage:

    $ /bin/sh -c 'f=(x|y);echo "$f"'
    x|y

It worked because the ^ alternation isn't needed, since it looks like all
candidate file names start with "./".  I prefer to keep the alternation
in case there's a way to end up with file names with no such prefix.

> I'll push the patch shortly, if you haven't done so.

Please do.

Reply via email to