Copyright (C) 2000-2012 |
GNU Info (zsh.info)Brace ExpansionBrace Expansion =============== A string of the form `FOO{XX,YY,ZZ}BAR' is expanded to the individual words `FOOXXBAR', `FOOYYBAR' and `FOOZZBAR'. Left-to-right order is preserved. This construct may be nested. Commas may be quoted in order to include them literally in a word. An expression of the form `{N1..N2}', where N1 and N2 are integers, is expanded to every number between N1 and N2 inclusive. If either number begins with a zero, all the resulting numbers will be padded with leading zeroes to that minimum width. If the numbers are in decreasing order the resulting sequence will also be in decreasing order. If a brace expression matches none of the above forms, it is left unchanged, unless the BRACE_CCL option is set. In that case, it is expanded to a sorted list of the individual characters between the braces, in the manner of a search set. `-' is treated specially as in a search set, but `^' or `!' as the first character is treated normally. Note that brace expansion is not part of filename generation (globbing); an expression such as */{foo,bar} is split into two separate words */foo and */bar before filename generation takes place. In particular, note that this is liable to produce a `no match' error if _either_ of the two expressions does not match; this is to be contrasted with */(foo|bar), which is treated as a single pattern but otherwise has similar effects. automatically generated by info2www version 1.2.2.9 |