Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Another brace expansion oddity



Zsh expands an empty alternative in brace expansion into an empty string
argument (as if quoted), whereas bash expands it to nothing.  Note the
number of blank lines printed in each case below.

schaefer[501] bash2
[schaefer@toltec schaefer]$ printf "%s\n" {,}

[schaefer@toltec schaefer]$ printf "%s\n" x {,} y
x
y
[schaefer@toltec schaefer]$ exit
schaefer[502] printf "%s\n" x {,} y
x


y
schaefer[503] printf "%s\n" {,}


schaefer[504] 



Messages sorted by: Reverse Date, Date, Thread, Author