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 original poster's case they
wanted the to see the braces output but here your exampld is a case
where they are being output and yet they should not be.
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 POSTSCRIPT." Your example did not
have either comma-separated strings nor a sequence and therefore does
not qualify for brace expansion and should have been left verbatim.
And yet bash did brace expansion anyway. That is an inconsistency.
Bob
_______________________________________________
Bug-bash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-bash