Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 3.1.4: Re: zsh bug with local variables?
- X-seq: zsh-workers 4318
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: 3.1.4: Re: zsh bug with local variables?
- Date: Tue, 18 Aug 1998 09:01:47 -0700
- In-reply-to: <199808181451.QAA03048@xxxxxxxxxxxx>
- References: <199808181451.QAA03048@xxxxxxxxxxxx>
On Aug 18, 4:51pm, Peter Stephenson wrote:
} Subject: PATCH: 3.1.4: Re: zsh bug with local variables?
}
} ! /* If this was a local variable, we need to keep the old *
} ! * struct so that it is resurrected at the right level. *
} ! * This is partly because when an array/scalar value is set *
} ! * and the parameter used to be the other sort, unsetparam() *
} ! * is called. Beyond that, there is an ambiguity: should *
} ! * foo() { local bar; unset bar; } make the global bar *
} ! * available or not? The following makes the answer "no". */
That's consistent with the 3.0.5 behavior. Remember my namedir tests?
With this patch applied, 3.1.4 behaves exactly like 3.0.5 again:
zagzig% namedir_test
zsh 3.1.4
TEST 1
namedir1: test1=/etc
namedir1: test1=/etc
namedir2: test1=/etc
namedir1: test1=/etc
namedir3:
namedir1: test1=/etc
namedir4:
TEST 2
namedir1: test2=/etc
namedir1: test2=/etc
namedir2: test2=/etc
namedir1: test2=/etc
namedir3:
namedir1: test2=/etc
namedir4: test2=/usr/bin
(I still think the namedir4 behavior is wrong.)
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author