Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: RFC: function -T f { … }



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