From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7656 invoked from network); 10 Oct 2003 12:42:38 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 10 Oct 2003 12:42:38 -0000 Received: (qmail 21128 invoked by alias); 10 Oct 2003 12:42:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6684 Received: (qmail 21088 invoked from network); 10 Oct 2003 12:42:20 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 10 Oct 2003 12:42:20 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [195.64.83.12] by sunsite.dk (MessageWall 1.0.8) with SMTP; 10 Oct 2003 12:42:20 -0000 Received: by timix.globnix.org with local id 1A7wb5-0007IW-00; Fri, 10 Oct 2003 12:42:19 +0000 Date: Fri, 10 Oct 2003 12:42:19 +0000 From: Phil Pennock To: zsh-users@sunsite.dk Subject: Re: Useful zsh/datetime things Message-ID: <20031010124218.GA15016@globnix.org> Mail-Followup-To: zsh-users@sunsite.dk References: <1031009172754.ZM10491@candle.brasslantern.com> <20031009174926.GA12280@globnix.org> <1031010044052.ZM11468@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1031010044052.ZM11468@candle.brasslantern.com> On 2003-10-10 at 04:40 +0000, Bart Schaefer wrote: > 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". Ah. Good thing that long habit keeps me using "$@" instead of dropping the quotes to get $@ for zsh then. Any other side-effects to not quoting variables in zsh? Backslash degree-of-toothpickiness, I suppose. > You'd get strange effects if it didn't work this way; e.g., $* would > always substitute an empty string, even when $# == 0. And you could of course get an empty string by explicitly using "$*" or "${*:-}" which would be the same, but make the intention explicit. Ta. -- 2001: Blogging invented. Promises to change the way people bore strangers with banal anecdotes about their pets.