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

Re: Debugging of dynamocally defined functions

Andrej Borsenkow wrote:

> Trying to debug one problem I had to look at set -x output of compinit. The
> last line was compdef:101:... It turned out, there is no way to find correct
> place. compdef is itself defined in compinit, and has comments. which
> compdef produces source without comments and line numbers do not match.
> Honestly speaking, I never liked it (function defining other functions that
> is); why not simply have them autoloaded is beyond me.

You were here, you should know.  That it's historical -- what now is
compinit once was the whole completion system (with so many changes that
noone would recognise it, but...).  It's just that noone took the time
to move compdef into an autoloaded file.

About the line numbers: the way I normally do it is to move the cursor
to the first line of the function and then use cursor-down with a prefix
argument.  Ugly, I agree.

Hm, could we change it so that it saves the line number of the script or
surrounding function?


Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

Messages sorted by: Reverse Date, Date, Thread, Author