[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/8] builtins/source: parse the -i option
From: |
Matheus Afonso Martins Moreira |
Subject: |
Re: [PATCH v2 5/8] builtins/source: parse the -i option |
Date: |
Tue, 14 May 2024 22:08:49 +0000 |
I agree that it is not strictly necessary.
It could be implemented without an option.
I personally have no objections to that solution.
My arguments for the option are the following:
- It enhances compatibility
Without the option, source behaves exactly as before.
Existing scripts will work exactly as before even if
the user has defined BASH_SOURCE_PATH.
I paid special attention to the posixly correct behavior.
- It's opt in
Users will have to explicitly choose to use
the new behavior of source, preventing errors.
- It simplifies and reduces cognitive load
Passing -i means only the directories in
BASH_SOURCE_PATH will be searched,
and no other direcrories. Easy to understand.
- It's clear and explicit
Passing -i makes it explicit to anyone
reading the scripts that they were written
with this new behavior in mind.
-- Matheus
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, (continued)
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/16
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Greg Wooledge, 2024/05/16
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Greg Wooledge, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/20
- 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, Chet Ramey, 2024/05/16
- Re: [PATCH v2 5/8] builtins/source: parse the -i option,
Matheus Afonso Martins Moreira <=
- 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
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/15
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/16
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, G. Branden Robinson, 2024/05/16
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/16
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Martin D Kealey, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/16
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Lawrence Velázquez, 2024/05/16