[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode
From: |
Matheus Afonso Martins Moreira |
Subject: |
Re: Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode |
Date: |
Tue, 14 May 2024 02:53:47 +0000 |
> I think we should restrict the search in
> BASH_SOURCE_PATH and shouldn't fall back to local files.
I concur but thought it'd be wise to discuss it first so I left it in.
Users might expect it to respect the configuration option.
I also saw that many of the PATH-like variable defaults
had the current directory in them. Finally, there is precedent
for this in other programming languages.
> Even if we intensionally fall back to local files, this part seems
> just a repetition of `search_for_file()'. I think this common part
> should be moved to `builtin_source()'.
I made it that way because it was explicitly requested
that the POSIX mode behavior not be affected in any way.
This way it's clear that there are two algorithms that the
function branches into and that they are completely
independent of each other. Should the current directory
searching logic be eliminated, the function will be simpler.
-- Matheus
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, (continued)
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/15
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Koichi Murase, 2024/05/15
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/14
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/14
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/15
[PATCH v2 6/8] builtins/source: use source path in isolated mode, Matheus Afonso Martins Moreira, 2024/05/13
Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode, Chet Ramey, 2024/05/14
Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode, Koichi Murase, 2024/05/14
Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode, Chet Ramey, 2024/05/15
Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode, Koichi Murase, 2024/05/15
[PATCH v2 7/8] variables: define default BASH_SOURCE_PATH, Matheus Afonso Martins Moreira, 2024/05/13
[PATCH v2 8/8] shell: restrict BASH_SOURCE_PATH when appropriate, Matheus Afonso Martins Moreira, 2024/05/13