Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Another brace expansion oddity
- X-seq: zsh-workers 20975
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Another brace expansion oddity
- Date: Sat, 12 Mar 2005 20:38:19 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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