Linda Walsh wrote:

> Another question (maybe a budding RFE?) is: Is there a way to find
> out (and print the "source stack" -- i.e. nested "calls" using
> "." to source files that are sourcing more...etc.  I know it isn't
> technically a procedure call, but there is a concept of a call
> stack in  that a sourced file is performed as though inserted in
> the current routine, then control resumes at the first line after
> the source.
> Semantically -- it isn't a "call stack", but more akin to the actions
> of a "preprocessor", but "syntactically", it functions much like
> file a calls(sources) b, b calls(sources) c... etc...

Look at the BASH_SOURCE array variable.  It was originally added as
part of the support for the bash debugger, but it does what you want.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to