Re: [PATCH 2/9] findcmd: parameterize path variable in functions

2024-05-07 Thread Matheus Afonso Martins Moreira
> No, it should be implemented using a call to find_in_path() with the > appropriate path string and flags. > > I feel like a feature like BASH_SOURCE_PATH should take less than a > dozen lines of code in source_builtin(). I agree. My version took more because I like splitting things into separat

Re: [PATCH 2/9] findcmd: parameterize path variable in functions

2024-05-07 Thread Chet Ramey
On 5/7/24 6:35 AM, Koichi Murase wrote: For consistency, shouldn't the suggested feature to change the search path for the script files be implemented by a similar flag CMDSRCH_XXX? No, it should be implemented using a call to find_in_path() with the appropriate path string and flags. I feel

Re: [PATCH 2/9] findcmd: parameterize path variable in functions

2024-05-07 Thread Koichi Murase
2024年5月5日(日) 18:56 Matheus Afonso Martins Moreira : > The PATH variable is hard coded in the user command finder function. > Transforming it into an argument allows reusing the file finding logic > with variables other than PATH, making the code more flexible. There is already a very similar featu