From ca6f4466e661f185d083e09c55fb93d16e0736cc Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sun, 22 Dec 2019 04:52:38 +0000 Subject: 45131: Make a function that redefines itself preserve its tracedness. This makes it easy to apply local tracing ('functions -T') to autoloadable functions that redefines themselves when first loaded. --- Test/E02xtrace.ztst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Test') diff --git a/Test/E02xtrace.ztst b/Test/E02xtrace.ztst index da6191cd0..8d2c300cf 100644 --- a/Test/E02xtrace.ztst +++ b/Test/E02xtrace.ztst @@ -146,3 +146,12 @@ ?+(anon):0> '(anon)' ?+(anon):0> true ?+fn:0> gn + + f() { + f() { echo inner } + } + functions -T f + f + which f | grep '# traced' +0:a function that redefines itself preserves tracing +> # traced -- cgit 1.4.1