bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH v2 5/8] builtins/source: parse the -i option


From: Chet Ramey
Subject: Re: [PATCH v2 5/8] builtins/source: parse the -i option
Date: Mon, 20 May 2024 11:48:39 -0400
User-agent: Mozilla Thunderbird

On 5/17/24 9:47 PM, Martin D Kealey wrote:


On Fri, 17 May 2024 at 04:18, Chet Ramey <chet.ramey@case.edu <mailto:chet.ramey@case.edu>> wrote:

    On 5/16/24 11:54 AM, G. Branden Robinson wrote:
     > At 2024-05-16T11:36:50-0400, Chet Ramey wrote:
     >> On 5/15/24 6:27 PM, Robert Elz wrote:
     >>> and any attempt to use a relative path (and you
     >>> can exclude ./anything or ../anything from that if you prefer - ie:
     >>
     >> Those are not relative paths.
     >
     > !
     >
     > POSIX 1003.1-202x/D4, §3.311 defines "relative pathname" thus:
     >
     > "A pathname not beginning with a <slash> character."
     >
     > Can you clarify?  Does Bash have its own definition of this term?

    In this specific case, I suppose. In default mode, `source' doesn't use
    $PATH for ./x and ../x, but does for other relative pathnames.


I assumed that "default mode" means "not posix mode", but if so that doesn't hold up:

No, you're right. It forces a PATH search, but the path search itself
won't search for pathnames containing a slash. (Which is arguably a
mistake, but one we made 30+ years ago.)

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