zsh-workers
 help / color / mirror / code / Atom feed
* Reference to $_ during typeset
       [not found]       ` <CAKc7PVC=Sus9AyyjcrkO9E6AiuCGr3mW+ZtCcKQMeES87pqDyQ@mail.gmail.com>
@ 2016-06-10  6:31         ` Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2016-06-10  6:31 UTC (permalink / raw)
  To: zsh-workers; +Cc: Sebastian Gniazdowski

[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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-10  6:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAKc7PVBXdgRVMUrZwvDK93BHycPYC7zeafg0=TNmqYEA=xdn+g@mail.gmail.com>
     [not found] ` <CAKc7PVAfFPtpJ0APsN-oE2dpvaijd2_h67acgf9TWvgpfGuJ3Q@mail.gmail.com>
     [not found]   ` <CAKc7PVB4y+dw+0Ox76_YTrzwT1C9sRp2=iX1-JkbPQEUQqe77w@mail.gmail.com>
     [not found]     ` <160609134641.ZM4758@torch.brasslantern.com>
     [not found]       ` <CAKc7PVC=Sus9AyyjcrkO9E6AiuCGr3mW+ZtCcKQMeES87pqDyQ@mail.gmail.com>
2016-06-10  6:31         ` Reference to $_ during typeset Bart Schaefer

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).