[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: [PATCH 0/4] Add import builtin
From: |
Matheus Afonso Martins Moreira |
Subject: |
Re: Re: [PATCH 0/4] Add import builtin |
Date: |
Wed, 08 May 2024 18:56:19 +0000 |
> This is your key assertion, and it does not appear to have achieved
> consensus.
That's true, unfortunately.
>> The behavior of the source builtin already has several special cases.
> Do you mean the treatment of the DEBUG trap? That's for the debugger.
I mean that the source builtin already behaves differently
depending on the state of the shell. The bash documentation
for the source builtin states:
> If filename does not contain a slash,
> the PATH variable is used to find filename,
> but filename does not need to be executable.
> When Bash is not in POSIX mode,
> it searches the current directory
> if filename is not found in $PATH.
I thought that simply adding the BASH_SOURCE_PATH
variable would end up adding a new if statement to the
documentation. Something like:
> If the BASH_SOURCE_PATH environment variable
> is defined, bash will search for filename in the
> directories specified by it first, falling back to
> PATH if not found.
I interpreted that as adding complexity to the builtin
and sought to avoid it by taking another approach.
The result would be documented like this:
> If the -l option is passed, bash searches the directories
> specified by BASH_LIBRARIES _PATH only. PATH is ignored.
I thought that was simpler.
-- Matheus
- Re: Re: [PATCH 0/4] Add import builtin, (continued)
- Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/08
- Re: Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/08
- Re: Re: Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/08
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/08
- Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/08
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Lawrence Velázquez, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/08
- Re: Re: [PATCH 0/4] Add import builtin,
Matheus Afonso Martins Moreira <=
- Re: Re: Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/06
- Re: Re: Re: [PATCH 0/4] Add import builtin, Martin D Kealey, 2024/05/07
- Re: Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/08
- Re: Re: Re: [PATCH 0/4] Add import builtin, Phi Debian, 2024/05/05
- Re: Re: [PATCH 0/4] Add import builtin, konsolebox, 2024/05/08
Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/03
Re: [PATCH 0/4] Add import builtin, Robert Elz, 2024/05/03