[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions
From: |
Chet Ramey |
Subject: |
Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions |
Date: |
Wed, 15 May 2024 09:43:59 -0400 |
User-agent: |
Mozilla Thunderbird |
On 5/14/24 7:50 PM, Matheus Afonso Martins Moreira wrote:
The first thing I did after reading that was look up this find_in_path
function which I had somehow missed. I found that indeed it's the
right solution and agreed with him. However, I also found that it
takes as its string parameter a colon-separated list of directories,
not the name of the PATH-like variable that string is bound to.
Passing the value allows the caller to determine how to treat specific
values. For instance, if we wanted to handle a NULL value differently
than, say, _find_user_command_internal(), the caller can choose to do
that.
--
``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/
- Re: Re: Re: [PATCH 0/9] Add library mode to source builtin, (continued)
[PATCH v2 0/8] Add isolated mode to source builtin, Matheus Afonso Martins Moreira, 2024/05/13
Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions, Chet Ramey, 2024/05/14
Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions, Chet Ramey, 2024/05/14
Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions, Matheus Afonso Martins Moreira, 2024/05/14
Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions, Matheus Afonso Martins Moreira, 2024/05/14
Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions, Chet Ramey, 2024/05/15
[PATCH v2 2/8] findcmd: define find_in_path_var function, Matheus Afonso Martins Moreira, 2024/05/13
[PATCH v2 3/8] builtins/source: extract file executor function, Matheus Afonso Martins Moreira, 2024/05/13
[PATCH v2 4/8] builtins/source: refactor file searching function, Matheus Afonso Martins Moreira, 2024/05/13
[PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/13