Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[BUG] Trap and local variable
- X-seq: zsh-workers 36838
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [BUG] Trap and local variable
- Date: Sun, 11 Oct 2015 23:01:23 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Kvd7VCvk2FMkfBW/WCHtppMoGL4YYN8LCacVVHt/Ghc=; b=jE6nkEe3ZDKUw61JgwofeiNKOmE9YCncG1kHc1Y/GBSrALlif0S+XBTLWcVn8UjXSq kdVyelBxzet3h7PbijCNOsZ6zyxT+robmF5h0jvA0MpzEWImv6iMLxCaU9+osSNqfYh+ LXYIcJ+7h6uMLNEx5fzMrWcPHmOcvUwr/LPlKAkP1w+Y0iYqj71tZGi6DeqI9dfrp6No eXDjLiOogKbmAHTw3xUqARdAd+JtYgq5FPp9IsyOeCuQ5+onnCc6QqHRISvRmKmtehd3 iNGoWClW1mRX+drJ88ryiFFX/eHwZN0BWQgBsRjLg+AbIBYGeISwq/vLAd+lyDE9gIxA CkJg==
- 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
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author