From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12513 invoked by alias); 3 Mar 2016 23:34:42 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21346 Received: (qmail 10524 invoked from network); 3 Mar 2016 23:34:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=IUu9238bJoPrsU2SDBy831FCkuLRwVoL6Em5lGx24qE=; b=HTzBEOOP8q3QpfS1KTm+NEuqOT8hNL2TNRCFqYXbal7smqSDkn0mrnsdvfufC3GQvy 5J3Wglq0a1hxyE20/Ml/PPQ36mTKUogYiOVMJXSDyTumaotH3YHIdfUojeh38+kVc0z+ QA9iQ1tDUbtPxsh46IBrofi8BZWzMkqHB5DRgvvstyseWWVy9nTtYGsSQtig6zxWBgzH WoTp/NW95uIfHWCEcVV8HmHq2/REvrtzmNISxVo5HjIsMunfuAVg9nqFc74yVlpO+qTA BbOle+7gEUHrTiChvC5tFfLxvxgHhMsuNWUTSvhwIqHPVNZp8flkHjd4PdUKBpTl9iwM EdJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=IUu9238bJoPrsU2SDBy831FCkuLRwVoL6Em5lGx24qE=; b=IL+hQRlo1oMqQpt3CuABAKA6kn8z94hQTQNBia9MJf3IvNkMPT39aSjHVafdrZDh59 1TlCGQyI4d1d9Jc5pJ1FcJ8MTbX1o65xMDaaBtUPD3trOnP1o5sRvFvyCwV/jEixKqVb mFMv36Y3VM5ktEnvcglCsqtdoiQhL6uC48Zcp1zuzpfwdEAh5oDE4KKhPSxxQFAGWWfC N0mhZ1CFLty0kg2tWcX0G9dK0UK94pl2ZlUCnk84L7TDvnlq6lKvJUS98dZH6E379lBF woltmFKGiR5g5giHQIXNDrnUmz5kZ+S8jqK5NJFS42X5bOX9qMvAij336OqbDsLxdSFk eHaQ== X-Gm-Message-State: AD7BkJJ6J2DWGJ/DjtvYcmdbjbaC2MsfLVcJTY+0DhWqX3ZOy4yjK3bRNNwuyfnJnO4jmw== X-Received: by 10.66.121.97 with SMTP id lj1mr7495158pab.51.1457048079550; Thu, 03 Mar 2016 15:34:39 -0800 (PST) From: Bart Schaefer Message-Id: <160303153436.ZM31948@torch.brasslantern.com> Date: Thu, 3 Mar 2016 15:34:36 -0800 In-Reply-To: <1533e4d3e82.cbf3800a134118.3897690426664036468@enosys.org> Comments: In reply to Ryan Wilson "[bug] () { echo $#} $'' is zero" (Mar 3, 3:16pm) References: <1533e4d3e82.cbf3800a134118.3897690426664036468@enosys.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "zsh-users@zsh.org" Subject: Re: [bug] () { echo $#} $'' is zero MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 3, 3:16pm, Ryan Wilson wrote: } Subject: [bug] () { echo $#} $'' is zero } } Subject says it all. The empty string $'' is not passed to commands the same } way the empty strings "" and '' are: $'...' is not a quoted expression, it's a substitution (at least as far as zsh is concerned). It behaves like expanding a $parameter reference, except that the value is the string inside the '...' part. Thus set -- $'' is more akin to x='' set -- $x than to set -- '' This does appear to be out of step with other shells. Follow-ups to zsh-workers.