Stephane Chazelas wrote:
On Thu, Oct 05, 2006 at 12:23:41AM +0200, Reuti wrote:
[...]
Curly braces expansion only works with at least one comma (,). This also works, if the appears at least once
        inside some apostrophes and has no function.

Repeat-By:
        [EMAIL PROTECTED]:~> bash --version
        GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0)
        Copyright (C) 2002 Free Software Foundation, Inc.
        [EMAIL PROTECTED]:~> echo {"x x"} # No {} in output expected.
        {x x}
        [EMAIL PROTECTED]:~> echo {"xx"} # No {} in output expected.
        {xx}
        [EMAIL PROTECTED]:~> echo {"xx","yy"} # Works fine.
        xx yy
[EMAIL PROTECTED]:~> echo {"x,x"} # Add a comma to get it working, i.e. remove the {}.
        x,x
        [EMAIL PROTECTED]:~>

        Also this seems to be strange:

[EMAIL PROTECTED]:~> echo {"klklkl"} {1,2,3} # Only second {} works correctly.
        {klklkl} 1 2 3
        [EMAIL PROTECTED]:~> echo {"klklkl"}{1,2,3} # Completely messed up.
        {klklkl}{1,2,3}

Only that one is a bug, it should output {klklkl}1 {klklkl}2
{klklkl}3

The other ones work as documented.

From info -f bash -n 'Brace Expansion'

 | A correctly-formed brace expansion must contain unquoted
 | opening and closing braces, and at least one unquoted comma
 | or a valid sequence expression.  Any incorrectly formed brace
 | expansion is left unchanged.

...but doesn't that mean that '{"x,x"}' should expand as '{x,x}', not 'x,x'? Note *unquoted* in the sentence above.

--
Matthew
"What's Cygwin?" you ask.
'Tis mostly absurd software
Concerning hippos.



_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to