A previous note had me wondering why the syntax for using
curly braces to group expressions wasn't able to be the same as
using 'paren's.

I.e. on the same line, why do I need an extra ";" before the '}':
(ls) works
{ls} fails -- needs {ls;}

I know braces can be part of a filename, but they can also be quoted
to get around the shell interpreting them if there is confusion,
OR the shell could try to be smarter about "curlies" than parens..
like:
(ls /tmp)
won't ever be interpreted as looking for file "/tmp\)".
With curlies, to reduce backwards compat issues, one could parse the
curlies in a filename and see if the '}' might be closing an opening '{'
that is part of the filename.

I.e.:
 {
   ls aaa}

would be interpreted as a closing curly brace, but
 {
   ls a{aa}

would not -- as it's likely  a closing brace in a user's filename.

Maybe an 'option'?: to syntactically treat braces as parens?
Then if one wanted a curly brace of any sort in a filename, they'd
would quote it.
-- and if you want a curly brace of any sort in
a filename, you'd have to quote it...


Reply via email to