Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Function for examining structure of calls in debug output
Hi, back from a few days on the road ...
On Aug 26, 5:40pm, Peter Stephenson wrote:
}
} You'll notice it's already confused because the return from _dispatch
} goes to _complete instead of _normal, since there are no further
} non-trivial commands in _normal, and searching back up the stack for the
} return function would mean there was no hope of it grokking recursive
} structures. I'm not sure how much effort I can be bothered to put into
} this. A better solution might be for a prompt escape that tracks the
} nesting level (which is trivial apart from picking a new letter).
I see you already implemented the latter idea. An alternate / additional
idea would be to have xtrace output a "return N" expression any time a
function returns, whenever there is no explicit return statement in the
source. The line number could be that of the closing curly brace, or
perhaps some flag value such as -1.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author