[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/4] Add import builtin
From: |
Phi Debian |
Subject: |
Re: [PATCH 0/4] Add import builtin |
Date: |
Mon, 6 May 2024 07:21:22 +0200 |
On Sun, May 5, 2024 at 9:47 PM Greg Wooledge <greg@wooledge.org> wrote:
> On Sun, May 05, 2024 at 03:32:04PM -0400, Lawrence Velázquez wrote:
>
>
> The idea to add a BASH_SOURCE_PATH variable that gets searched before, or
> instead of, PATH when using the source builtin -- that sounds good. I
> don't really understand the concepts behind the rest of the discussion.
>
>
Well even this is unclear 'BASH_SOURCE_PATH get searched before PATH' or
'BASH_SOURCE_PATH get searched instead of' or even 'BASH_SOURCE_PATH get
searched after PATH'
Each have valid reasons to exist...
Anyway if this is the only desire then a simple
In module system init .sh (used by .rc or other .sh)
IPATH=... ; alias xyz_import ='PATH="$IPATH" source' ; alias xyz_type
='PATH="$IPATH" type'
Above the setup is for 'instead of PATH', 'PATH="$IPATH:$PATH" source' for
before PATH and so on.
Then you can use xyz_import foo.sh or xyz_type foo.sh
BTW I didn't red all the patches, but I wonder what the semantic of the
builtin 'type' becomes in your implementation, I guess that on top of
currently defined concepts (file, function, alias, builtin) you now add
'library (better name needed)' with all the docco and jazz about it.
The risk/profit (or even ROI) seems not favorable, i.e the implementation,
the QA tests, the docco.
For something that can be done in a 1 liner in an .rc file, I am really not
convinced.
- Re: Re: [PATCH 0/4] Add import builtin, (continued)
- Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/03
- Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/03
- Re: Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/03
- Re: Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/03
- Re: Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/03
- Re: Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/04
- Re: Re: Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/05
- Re: Re: Re: Re: [PATCH 0/4] Add import builtin, Oğuz, 2024/05/05
- Re: [PATCH 0/4] Add import builtin, Lawrence Velázquez, 2024/05/05
- Re: [PATCH 0/4] Add import builtin, Greg Wooledge, 2024/05/05
- Re: [PATCH 0/4] Add import builtin,
Phi Debian <=
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Koichi Murase, 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/06
- Re: Re: [PATCH 0/4] Add import builtin, Phi Debian, 2024/05/06
- Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/06
- Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/06
- Re: Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/06
- Re: [PATCH 0/4] Add import builtin, Kerin Millar, 2024/05/06
- Re: [PATCH 0/4] Add import builtin, Phi Debian, 2024/05/07