Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
expansion bug in 4.0.3?
- X-seq: zsh-workers 16214
- From: Danek Duvall <duvall@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: expansion bug in 4.0.3?
- Date: Sat, 3 Nov 2001 00:00:21 -0800
- Mail-followup-to: Danek Duvall <duvall@xxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
This example is easily reconstructed on Linux:
% echo $$
146
% print -l ${$(</proc/$$/environ)}
DISPLAY=:0.0 HOME=/home/duvall LOGNAME=duvall USER=duvall [ ... ]
% print -l ${$(</proc/146/environ)}
DISPLAY=:0.0
HOME=/home/duvall
LOGNAME=duvall
USER=duvall
[ ... ]
The only difference is that in one case the filename is specified with a
parameter, in the other, without. If, in the former case, I explicitly
split on spaces:
% print -l ${(s: :)$(</proc/$$/environ)}
then I get the output I want. Alternatively, if I skip the outer
braces:
% print -l $(</proc/$$/environ)
then the output also comes out on multiple lines.
(For those not on Linux, this file contains fields separated by null
characters.)
Is this a bug, or is there some behavior I'm not understanding properly?
Thanks,
Danek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author