This second patch goes after the first one:
- add a bugfix to the first patch
- enable global $LINENO
At the moment when $LINENO is printed by a function the number displayed is the lines from the start of the function.
Unfortunately, this information is useless because we do not have $FUNCNAME.
Even if we have $FUNCNAME having always an absolute $LINENO will be more easier.
In fact this will be the quickest way to reach the break point
- vi script.sh :$n
The two patches goes together because having the $LINENO without the ability to use in an error trap is not very useful.
I will add in attachment a script for testing in the next post.
Please let me know what you think,
-R