[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newlines in ERR trap affect caller 0 line number
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: Newlines in ERR trap affect caller 0 line number |
Date: |
Thu, 4 Nov 2021 16:55:03 +0100 |
thats around the same as aliases, inline text replacements , yes ?
informative question
On Thu, Nov 4, 2021, 16:53 Chet Ramey <chet.ramey@case.edu> wrote:
> 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 chet@case.edu http://tiswww.cwru.edu/~chet/
>
>