zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] Trap and local variable
@ 2015-10-11 21:01 Sebastian Gniazdowski
  2015-10-11 21:32 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2015-10-11 21:01 UTC (permalink / raw)
  To: zsh-workers

Hello,
following code:

b() { integer locl=1337; globl=2337; a() { echo "$locl, $globl"; };
trap "a" EXIT }; b

outputs only 2337. If one tries this first:

integer locl=1337; globl=2337; a() { echo "$locl, $globl"; }; b() {
trap "a" EXIT }; b

then the previous version will also work fine.

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-11 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-11 21:01 [BUG] Trap and local variable Sebastian Gniazdowski
2015-10-11 21:32 ` 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).