Per section 3.5.1 of the Bash manual:
Brace expansion is a mechanism by which arbitrary strings may be generated. This mechanism is similar to filename expansion, but the filenames generated need not exist. Patterns to be brace expanded take the form of an optional preamble, followed by either a series of comma-separated strings or a sequence expression between a pair of braces, followed by an optional postscript. The preamble is prefixed to each string contained within the braces, and the postscript is then appended to each resulting string, expanding left to right.
In your case, there is no preamble or postscript, so it's just expanding to each of the elements in the list.
You can see the result by using echo
:
echo {a=1,b=2,c=3}
Which outputs:
a=1 b=2 c=3
If you were to use a preamble and postscript:
echo before{a=1,b=2,c=3}after
You get:
beforea=1after beforeb=2after beforec=3after
I typically use this when trying to copy or move a file to a backup:
cp somefile.txt{,.bak}
Which expands to:
cp somefile.txt somefile.txt.bak