[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/4] Add import builtin
From: |
Chet Ramey |
Subject: |
Re: [PATCH 0/4] Add import builtin |
Date: |
Fri, 3 May 2024 09:18:09 -0400 |
User-agent: |
Mozilla Thunderbird |
On 5/2/24 6:22 PM, Matheus Afonso Martins Moreira wrote:
This patch set introduces a new "import" builtin which behaves just like
the source builtin but only looks up executables in the BASH_IMPORT_PATH
variable.
How is this any different than
PATH=$BASH_IMPORT_PATH:$PATH source
or
PATH=$BASH_IMPORT_PATH source
You could force the latter if you are sure that the sourced files will
not attempt to run external commands.
You could even make this an alias if you want. I'd hesitate to make it a
function, unless you're sure that no file you source uses `declare' to
create variables, since those will be local to the function by default.
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/
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Re: [PATCH 0/4] Add import builtin, (continued)
- 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, 2024/05/08
- 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 <=
Re: [PATCH 0/4] Add import builtin, Robert Elz, 2024/05/03