Michal Hlavinka
2013-07-08 17:09:31 UTC
Hi,
it seems braceexpand option does not always affect expansions, sometimes
it depends on glob option.
$ a='{1..6}'
$ set -o | sed -n -e /glob/p -e /braceexpand/p
braceexpand on
glob on
globstar off
$ print $a
1 2 3 4 5 6
$ set +o braceexpand
$ set -o | sed -n -e /glob/p -e /braceexpand/p
braceexpand off
glob on
globstar off
$ print $a
1 2 3 4 5 6
$ set -o braceexpand
$ set +o glob
$ set -o | sed -n -e /glob/p -e /braceexpand/p
braceexpand on
glob off
globstar off
$ print $a
{1..6}
Seems braceexpand has no effect. Instead glob options
affects expansion.
Michal
it seems braceexpand option does not always affect expansions, sometimes
it depends on glob option.
$ a='{1..6}'
$ set -o | sed -n -e /glob/p -e /braceexpand/p
braceexpand on
glob on
globstar off
$ print $a
1 2 3 4 5 6
$ set +o braceexpand
$ set -o | sed -n -e /glob/p -e /braceexpand/p
braceexpand off
glob on
globstar off
$ print $a
1 2 3 4 5 6
$ set -o braceexpand
$ set +o glob
$ set -o | sed -n -e /glob/p -e /braceexpand/p
braceexpand on
glob off
globstar off
$ print $a
{1..6}
Seems braceexpand has no effect. Instead glob options
affects expansion.
Michal