[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BASH_SOURCE gets confused when multiple sources are a priori candida
From: |
Chet Ramey |
Subject: |
Re: BASH_SOURCE gets confused when multiple sources are a priori candidates |
Date: |
Wed, 3 Jan 2018 16:00:39 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 1/2/18 11:19 AM, Chet Ramey wrote:
> On 12/18/17 8:06 AM, Bruno Vasselle wrote:
>
>> Bash Version: 4.4
>> Patch Level: 12
>> Release Status: release
>>
>> Description:
>> When a function looks like it is defined in multiple sources,
>> BASH_SOURCE does not reliably report it has defined
>> where it was actually defined. It seems to prefer the
>> last source bash has visited.
>
> Not quite. The file:line information is saved when the function definition
> is parsed, not when the function definition command is executed. This goes
> all the way back to when the debugging helper code came into bash. I'll
> take a look at changing it.
I took a look, and this will be fixed in the next devel branch push.
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/