On 10/31/21 6:06 PM, Quinn Grier wrote: > Bash Version: 5.1 > Patch Level: 8 > Release Status: release > > Description: > When an ERR trap includes newlines, the line number returned by > "caller 0" is affected.
Thanks for the report. I'll take a look. Right now, the ERR trap (really all traps) is treated as if the text of the trap appears inline in the source right after the command that triggered it, so parsing the text of the trap command increments the line number starting at the line number of the triggering command. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/