From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 12134 invoked from network); 18 Mar 2020 19:54:16 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 18 Mar 2020 19:54:16 -0000 Received: (qmail 11042 invoked by alias); 18 Mar 2020 19:54:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45576 Received: (qmail 11713 invoked by uid 1010); 18 Mar 2020 19:54:03 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-7.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25751. spamassassin: 3.4.2. Clear:RC:0(80.0.253.71):SA:0(-2.0/5.0):. Processed in 3.075392 secs); 18 Mar 2020 19:54:03 -0000 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _smtprelay.virginmedia.com designates 80.0.253.71 as permitted sender) X-Originating-IP: [86.16.88.158] X-Authenticated-User: p.w.stephenson@ntlworld.com X-Spam: 0 X-Authority: v=2.3 cv=Is0wjo3g c=1 sm=1 tr=0 a=MiHCjVqLJ44lE3bxSlffFQ==:117 a=MiHCjVqLJ44lE3bxSlffFQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=5KLPUuaC_9wA:10 a=nClKCG17dBiITHjooTgA:9 a=QEXdDO2ut3YA:10 Message-ID: Subject: Re: RFC: function -T f { =?UTF-8?Q?=E2=80=A6?= } From: Peter Stephenson To: zsh-workers@zsh.org Date: Wed, 18 Mar 2020 19:53:21 +0000 In-Reply-To: <20200318183026.35e74654@tarpaulin.shahaf.local2> References: <20200318183026.35e74654@tarpaulin.shahaf.local2> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfF5Uw8GHaU0ziOQzSz+iJ9l7u8K2U99+a311YFS7Pyf6Zag9Ml11WW7ov2lankXkUexj+pR2hqkZWqfvznFjlbJYagxOO+VrX/uamdA5x+KsrDAH3aEX prXosWI2pKRBDO1zXIuVeMKbEJ9jNqXI9GUq6Z43dcx1pTsRHohd+q4P On Wed, 2020-03-18 at 18:30 +0000, Daniel Shahaf wrote: > How about adding a «function -T f { … }» syntax, that defines a > function and enables tracing for it simultaneously? > > I've often found myself going to the first line of a function, copying > its name, then going to the closing brace of the function and adding > a «functions -T $thefunctionsname» statement there, in order to have > tracing enabled during multiple «zsh -f» runs. > > It's backwards incompatible, but not more than «printf -v» was. Can't see any objection, and can't see an easy workaround. It does work for autoloads --- you can turn on xtrace before the function is loaded. pws