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

Re: Debugging of dynamocally defined functions



On Jul 5,  9:33am, Andrej Borsenkow wrote:
} Subject: Debugging of dynamocally defined functions
}
} Honestly speaking, I never liked it (function defining other functions that
} is); why not simply have them autoloaded is beyond me.

In the case of compdef I agree with you -- it's complicated enough that it
should have an entry in the documentation (separate from the `#comdpef'
entries, which are deceptively similar but use slightly different syntax).

In other cases functions defining functions is quite appropriate; consider
the `compadd' front-end that's defined in _approximate or _complete_help.
Not only would it be a waste to put it in a separate file, it would cause
errors to locate that file anywhere in the fpath!

In another message, PWS said:
> 
> By the way, you can use the trick of
> 
>   eval "$(which compdef)"
> 
> to sync the line numbers with the which output.  At least I hope so ---
> if this goes screwy there's a bug in text.c.

No, you can't.  This causes all the lines to be numbered zero.

`zed -f' has the same problem; drives me nuts.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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