Chris F.A. Johnson wrote:
>Quote them, and they do expand:
>
> $ foo() { echo "${1:-"a{b,c}"}" ; }
> $ foo
> ab ac
Brace expansion is essentially separate from the rest of the expansions:
in fact, it's designed to be part of a separate library if desired. As
such, it doesn't implement all o
Tatavarty Kalyan schrieb am 08.09.2006 um 11:44:47 (+0800):
> >It is because the string
> > a{b,c}
> >is outside of the quotes. So the brace expansion comes first and
> >duplicates
> >the arguments to the echo call.
>
> Yes, as you said the brace expansion is outside the double quotes so
> s
On 9/8/06, Alexander Elgert <[EMAIL PROTECTED]> wrote:
Tatavarty Kalyan schrieb am 07.09.2006 um 14:20:43 (+0800):
> On 9/6/06, Chris F.A. Johnson <[EMAIL PROTECTED]> wrote:
> >
> >On 2006-09-06, Andreas Schwab wrote:
> >> [EMAIL PROTECTED] (Paul Jarc) writes:
> >>
> >>> Mike Frysinger <[EMAIL P
Tatavarty Kalyan schrieb am 07.09.2006 um 14:20:43 (+0800):
> On 9/6/06, Chris F.A. Johnson <[EMAIL PROTECTED]> wrote:
> >
> >On 2006-09-06, Andreas Schwab wrote:
> >> [EMAIL PROTECTED] (Paul Jarc) writes:
> >>
> >>> Mike Frysinger <[EMAIL PROTECTED]> wrote:
> this little bit of code doesnt wo
On 9/6/06, Chris F.A. Johnson <[EMAIL PROTECTED]> wrote:
On 2006-09-06, Andreas Schwab wrote:
> [EMAIL PROTECTED] (Paul Jarc) writes:
>
>> Mike Frysinger <[EMAIL PROTECTED]> wrote:
>>> this little bit of code doesnt work right:
>>> foo() { echo "${1:-a{b,c}}" ; }
The first '}' is interpreted
On 2006-09-06, Andreas Schwab wrote:
> [EMAIL PROTECTED] (Paul Jarc) writes:
>
>> Mike Frysinger <[EMAIL PROTECTED]> wrote:
>>> this little bit of code doesnt work right:
>>> foo() { echo "${1:-a{b,c}}" ; }
The first '}' is interpreted as the end of the parameter expansion.
>>
>> Brace expansi
On Wednesday 06 September 2006 05:04, Andreas Schwab wrote:
> [EMAIL PROTECTED] (Paul Jarc) writes:
> > Mike Frysinger <[EMAIL PROTECTED]> wrote:
> >> this little bit of code doesnt work right:
> >> foo() { echo "${1:-a{b,c}}" ; }
> >
> > Brace expansion happens before parameter expansion (man bash
[EMAIL PROTECTED] (Paul Jarc) writes:
> Mike Frysinger <[EMAIL PROTECTED]> wrote:
>> this little bit of code doesnt work right:
>> foo() { echo "${1:-a{b,c}}" ; }
>
> Brace expansion happens before parameter expansion (man bash,
> EXPANSION).
Brace expansion doesn't come into play here, because t
On Tuesday 05 September 2006 19:01, Paul Jarc wrote:
> Mike Frysinger <[EMAIL PROTECTED]> wrote:
> > this little bit of code doesnt work right:
> > foo() { echo "${1:-a{b,c}}" ; }
>
> Brace expansion happens before parameter expansion (man bash,
> EXPANSION). So the first "}" ends the parameter ex
Mike Frysinger <[EMAIL PROTECTED]> wrote:
> this little bit of code doesnt work right:
> foo() { echo "${1:-a{b,c}}" ; }
Brace expansion happens before parameter expansion (man bash,
EXPANSION). So the first "}" ends the parameter expression, and the
second "}" isn't special. The result of param
this little bit of code doesnt work right:
foo() { echo "${1:-a{b,c}}" ; }
$ foo
a{b,c}
$ foo 1
a}
tested with bash-3.1.17
-mike
pgp0Oi7rbI6UV.pgp
Description: PGP signature
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listi
William Park wrote:
>> side note, this also fails:
>> $ echo {a}{b,c}
>> {a}{b,c}
>> -mike
>
> But,
> echo {b,c}{x}
> prints the correct result,
> b{x} c{x}
>
> Well, gentlemen, we've found a bug. Anyone sending in a patch? I don't
> use multiple braces that often, so it doesn't bother
On Sun, Jan 29, 2006 at 08:16:40PM -0500, Mike Frysinger wrote:
> On Sunday 29 January 2006 20:08, William Park wrote:
> > On Sun, Jan 29, 2006 at 07:33:14PM -0500, Chris F.A. Johnson wrote:
> > > On Sun, 29 Jan 2006, William Park wrote:
> > > >Let's see...
> > > > a-{b{d,e}}-c
> > > > a-{bd,be
On Sunday 29 January 2006 20:08, William Park wrote:
> On Sun, Jan 29, 2006 at 07:33:14PM -0500, Chris F.A. Johnson wrote:
> > On Sun, 29 Jan 2006, William Park wrote:
> > >Let's see...
> > > a-{b{d,e}}-c
> > > a-{bd,be}-c
> > > a-bd-c a-be-c
> > >
> > >It looks okey, I think.
> >
> > Exc
On Sun, Jan 29, 2006 at 07:35:32PM -0500, Mike Frysinger wrote:
> On Sunday 29 January 2006 19:23, William Park wrote:
> > Let's see...
> > a-{b{d,e}}-c
> > a-{bd,be}-c
>
> i'm pretty sure the commas are consumed in the expansion
>
> side note, this also fails:
> $ echo {a}{b,c}
> {a}{b,c
On Sun, Jan 29, 2006 at 07:33:14PM -0500, Chris F.A. Johnson wrote:
> On Sun, 29 Jan 2006, William Park wrote:
> >Let's see...
> > a-{b{d,e}}-c
> > a-{bd,be}-c
> > a-bd-c a-be-c
> >
> >It looks okey, I think.
>
> Except that b{d,e} expands to 'bd be', not 'bd,be'.
Hmm... no. Internally
On Sunday 29 January 2006 19:23, William Park wrote:
> Let's see...
> a-{b{d,e}}-c
> a-{bd,be}-c
i'm pretty sure the commas are consumed in the expansion
side note, this also fails:
$ echo {a}{b,c}
{a}{b,c}
-mike
___
Bug-bash mailing list
Bug-
On Sun, 29 Jan 2006, William Park wrote:
On Sun, Jan 29, 2006 at 05:37:56PM -0500, Mike Frysinger wrote:
On Sunday 29 January 2006 17:25, Bob Proulx wrote:
The bash manual documents this as "Patterns to be brace expanded
take the form of an optional PREAMBLE, followed by either a series
of com
On Sun, Jan 29, 2006 at 05:37:56PM -0500, Mike Frysinger wrote:
> On Sunday 29 January 2006 17:25, Bob Proulx wrote:
> > The bash manual documents this as "Patterns to be brace expanded
> > take the form of an optional PREAMBLE, followed by either a series
> > of comma-separated strings or a sequnc
On Sunday 29 January 2006 17:25, Bob Proulx wrote:
> The bash manual documents this as "Patterns to be brace expanded take
> the form of an optional PREAMBLE, followed by either a series of
> comma-separated strings or a sequnce expression between a pair of
> braces, followed by an optional POSTSCR
Mike Frysinger wrote:
> bash -c 'echo a-{b}-c'
> a-{b}-c
>
> seems to me current behavior is inconsistent
Yes. That is inconsistent with csh.
csh -c 'echo a-{b}-c'
a-b-c
It is related to brace expansion but seems like a different case than
the original poster's bug report. In the origina
Tim Waugh wrote:
> echo a-{b{d,e}}-c
>
> Should get: a-{bd}-c a-{be}-c
> but actually get: a-bd-c a-be-c
Hmm... But csh is the origin of the brace expansion feature. So
shouldn't bash behave like csh? Which bash does do at this time.
csh -c 'echo a-{b{d,e}}-c'
a-bd-c a-b
On Saturday 28 January 2006 16:47, Bob Proulx wrote:
> Tim Waugh wrote:
> > echo a-{b{d,e}}-c
> >
> > Should get: a-{bd}-c a-{be}-c
> > but actually get: a-bd-c a-be-c
>
> Hmm... But csh is the origin of the brace expansion feature. So
> shouldn't bash behave like csh? Which bash doe
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/s
24 matches
Mail list logo