bug-bash
[Top][All Lists]
Advanced

[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: Tue, 2 Jan 2018 11:19:32 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

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.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]