From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29846 invoked from network); 10 Oct 2003 04:41:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 10 Oct 2003 04:41:10 -0000 Received: (qmail 16698 invoked by alias); 10 Oct 2003 04:40:54 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6682 Received: (qmail 16651 invoked from network); 10 Oct 2003 04:40:54 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 10 Oct 2003 04:40:54 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.3.58.249] by sunsite.dk (MessageWall 1.0.8) with SMTP; 10 Oct 2003 4:40:53 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h9A4eqK11469 for zsh-users@sunsite.dk; Thu, 9 Oct 2003 21:40:52 -0700 From: Bart Schaefer Message-Id: <1031010044052.ZM11468@candle.brasslantern.com> Date: Fri, 10 Oct 2003 04:40:52 +0000 In-Reply-To: <20031009174926.GA12280@globnix.org> Comments: In reply to Phil Pennock "Re: Useful zsh/datetime things" (Oct 9, 5:49pm) References: <1031009172754.ZM10491@candle.brasslantern.com> <20031009174926.GA12280@globnix.org> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: Useful zsh/datetime things MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 9, 5:49pm, Phil Pennock wrote: } } % stat -H foo -s . } % print -l ${(kv)foo} | pr -at2 } % print -l "${(@kv)foo}" | pr -at2 } } The second command doesn't give proper results, since there is no value } shown for the key 'link', so after that things are mis-placed. } } But why is there not a blank line? Because an unquoted empty string always disappears. It just happens that the easiest way to get an unquoted empty string is to expand an unset or empty-valued parameter (the former assuming setopt no_unset). "Not split" (in the sh_word_split sense) is not equivalent to "quoted". You'd get strange effects if it didn't work this way; e.g., $* would always substitute an empty string, even when $# == 0.