bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposed BASH_SOURCE_PATH


From: Chet Ramey
Subject: Re: proposed BASH_SOURCE_PATH
Date: Wed, 3 Jul 2024 10:48:20 -0400
User-agent: Mozilla Thunderbird

On 6/26/24 7:18 PM, Martin D Kealey wrote:
I've found some existing code that will break if words in ${BASH_SOURCE[@]} don't match the filepath given to '.' or 'source':
   [[ ${BASH_ARGV[0]} = "${BASH_SOURCE[0]}" ]]
which is part of a test to determine whether any args were provided after "source filename".

konsolebox's proposed change doesn't affect this, only the path given to
bash as a script argument. I asked why he didn't change the other
assignments to BASH_SOURCE, but he hasn't replied yet.

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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