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

Re: Getting source file and line number of a function.



On Mon, 11 Aug 2008 16:00:21 +0200
"Richard Hartmann" <richih.mailinglist@xxxxxxxxx> wrote:
> On Sat, Aug 9, 2008 at 20:21, Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> wrote:
> 
> [stuff about $funcfiletrace]

(which now really is called that...)

> This just gave me an idea: Why not enhance `whence` so it is able to
> tell in what file and starting on what line a function has been defined?

Just to note I haven't forgot this yet (haven't looked at if or where it
fits without messing up the format).  I think it would be useful to
provide an associative array in zsh/parameter with this information to
get at it easily, something like $functionsources (since the assoc
array with the functions is called $functions).

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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