zsh-workers
 help / color / mirror / code / Atom feed
From: Danek Duvall <duvall@emufarm.org>
To: zsh-workers@sunsite.auc.dk
Subject: expansion bug in 4.0.3?
Date: Sat, 3 Nov 2001 00:00:21 -0800	[thread overview]
Message-ID: <20011103000021.A9262@lorien.emufarm.org> (raw)

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


             reply	other threads:[~2001-11-03  8:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-03  8:00 Danek Duvall [this message]
2001-11-03 16:43 ` PATCH: " Bart Schaefer
2001-11-03 17:13   ` Bart Schaefer
2001-11-03 20:35   ` [16215] " Danek Duvall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011103000021.A9262@lorien.emufarm.org \
    --to=duvall@emufarm.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).