bug-bash
[Top][All Lists]
Advanced

[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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]