Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[BUG] Anonymous functions cause funcfiletrace to produce function-relative line numbers
- X-seq: zsh-workers 42103
- From: dana <dana@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [BUG] Anonymous functions cause funcfiletrace to produce function-relative line numbers
- Date: Sun, 10 Dec 2017 17:28:03 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=G0L7BVhBDWJpnpd8dDMG9qLdaLgP18r/jTLNMuqz070=; b=EYGiZ4Fj7N2AIIkWpb04YvrqE0SZga7YboZ1y2jLalPUnIVjwl4YjBj2iYaI2iagPM cDWdjSFSbJOL3lNxlPAsMI1Xj86q9cafuDO6y1RrDBqRK0I54bw39rfVBM5dxogx6LQa 28x/NVufwFgyru2jWRVlmRGxcX6nqnnh0D+xF5URBzPkUXR0oJv04BsQFaVElWrOKE6F 2/OH+vLOCM3gMFoDMeI4D00QyrvXkHSWsWJBQqUhDSHxeaz+v+zAISHVJMPeyi8AXKKl VzhkwKGLObK8YhsbzBRvzyyTmHzN22x74yVLh6S6HvPva8HxAmQD7zJsgkwzWRiwjLEJ HT9g==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello again. Sorry for spamming the list, i can't seem to help myself.
I was experimenting with line-number tracing today and i found that anonymous
functions have an undesirable effect on funcfiletrace:
% cat -n tracetest.zsh
1 #
2 foo() {
3 #
4 #
5 #
6 #
7 #
8 () { () { print -rC2 -- $functrace $funcfiletrace } }
9 }
10 foo
% zsh tracetest.zsh
(anon):0 tracetest.zsh:6
foo:6 tracetest.zsh:8
tracetest.zsh:10 tracetest.zsh:10
Note that the top call from (anon) is listed as tracetest.zsh:6 (actually the
relative line number within the function foo) rather than the expected
tracetest.zsh:8 (the absolute line number within the file).
I looked at the parameter module very briefly but nothing stood out immediately.
Probably will be obvious to someone else why it does that.
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author