Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RFC: function -T f { … }
- X-seq: zsh-workers 45576
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: RFC: function -T f { … }
- Date: Wed, 18 Mar 2020 19:53:21 +0000
- In-reply-to: <20200318183026.35e74654@tarpaulin.shahaf.local2>
- 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
- References: <20200318183026.35e74654@tarpaulin.shahaf.local2>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author