Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Reference to $_ during typeset
- X-seq: zsh-workers 38645
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Reference to $_ during typeset
- Date: Thu, 9 Jun 2016 23:31:37 -0700
- Cc: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- 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:cc :mime-version; bh=y4W2VJYb5183XKk4G/xZ+gPCKntLRlE44Yv7zZgU6zY=; b=oU5kW/3w5yl8t4Opr3Xl37FRe6kYt/UNruyPIrxsu6SsTmOiXXRQf+Y+Th+iBX8ELf ttjFpW/CbvLeEfQpmfpvF6DAgJWwo+24XCAGDBEOqucSmLs2MTvIUVnpDLeWziITejc0 wPTp+J7AbDklJkPQ2Vjz4jOiJICQFJg+0WetkU9W2dApPZy3QVg2JTWdhAR/CyiWeMNV V9F24wqv1MjeZnOTPtoATDnorIPAklhb5hkR56MAV+lRUvTY1Y180O+5OPJ0O6RtZ3ak v89F2vhKbyRGlZy04xZ8DKRbVwKOYhKRyQK0sZYo1L/dsU0ACEEJPC0yvAXexeKUgNJY XbCA==
- In-reply-to: <CAKc7PVC=Sus9AyyjcrkO9E6AiuCGr3mW+ZtCcKQMeES87pqDyQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBXdgRVMUrZwvDK93BHycPYC7zeafg0=TNmqYEA=xdn+g@mail.gmail.com> <CAKc7PVAfFPtpJ0APsN-oE2dpvaijd2_h67acgf9TWvgpfGuJ3Q@mail.gmail.com> <CAKc7PVB4y+dw+0Ox76_YTrzwT1C9sRp2=iX1-JkbPQEUQqe77w@mail.gmail.com> <160609134641.ZM4758@torch.brasslantern.com> <CAKc7PVC=Sus9AyyjcrkO9E6AiuCGr3mW+ZtCcKQMeES87pqDyQ@mail.gmail.com>
[Bringing this over from zsh-users]
On Jun 10, 8:12am, Sebastian Gniazdowski wrote:
} Subject: Re: Can $_ substitute $0 when nofunctionargzero
}
} It is little hard to understand. For example something works in following:
}
} local var="I am $_"
} > I am local
That's a very strange definition of "works".
This began happening when local, typeset, et al. became keywords. It
doesn't "work" in zsh prior to that, and it's probably a bug in this
case. Zsh 5.0.3 (for example) shows the correct behavior:
torch% echo foo
foo
torch% local var="I am $_"
torch% print $var
I am foo
Whereas 5.1 is broken:
torch% echo foo
foo
torch% local var="I am $_"
torch% print $var
I am local
Probably this just shows how seldom $_ is used for anything at all.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author