[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "unset var" pops var off variable stack instead of unsetting it
From: |
Greg Wooledge |
Subject: |
Re: "unset var" pops var off variable stack instead of unsetting it |
Date: |
Mon, 20 Mar 2017 08:04:33 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Fri, Mar 17, 2017 at 09:51:34PM +0000, Stephane Chazelas wrote:
> Then, the "unset", instead of unsetting IFS, actually pops a
> layer off the stack.
> Credits to Dan Douglas
> (https://www.mail-archive.com/miros-mksh@mirbsd.org/msg00707.html)
> for finding the bug. He did find a use for it though (get the
> value of a variable from the caller's scope).
Isn't this exactly the same as the "upvar" trick that Freddy Vulto
discovered? http://www.fvue.nl/wiki/Bash:_Passing_variables_by_reference
- Re: "unset var" pops var off variable stack instead of unsetting it, (continued)
Re: "unset var" pops var off variable stack instead of unsetting it,
Greg Wooledge <=