Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread tlaronde
On Sun, Sep 22, 2024 at 05:35:39PM +, David Holland wrote: > On Sun, Sep 22, 2024 at 09:09:06AM +0200, tlaro...@kergis.com wrote: > > [stuff about searching $PATH for more things] > > A different and much less invasive way to get the first 90% of this is > to pick an otherwise unused metachar

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread David Holland
On Sun, Sep 22, 2024 at 09:09:06AM +0200, tlaro...@kergis.com wrote: > [stuff about searching $PATH for more things] A different and much less invasive way to get the first 90% of this is to pick an otherwise unused metacharacter (e.g. @) and use it as a tag meaning "search for the rest of this o

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread tlaronde
On Sun, Sep 22, 2024 at 06:58:25PM +0700, Robert Elz wrote: > Date:Sun, 22 Sep 2024 13:13:19 +0200 > From:tlaro...@kergis.com > Message-ID: > > | No: just the shell. Putting this in a C source will not be portable, > | since the shell used for system(3) would not

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread Robert Elz
Date:Sun, 22 Sep 2024 13:13:19 +0200 From:tlaro...@kergis.com Message-ID: | No: just the shell. Putting this in a C source will not be portable, | since the shell used for system(3) would not mandatorily understand | a "set -o xfilename" or whatever the name for

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread tlaronde
Thanks! I will come back to you when I have done the job (I think I will have a slot on thursday). Best, T. Laronde On Sun, Sep 22, 2024 at 06:07:21PM +0700, Robert Elz wrote: > > | is set, the option can not be set; if posix is set after, the option > | is reset to off) with a name of "xpa

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread RVP
On Sun, 22 Sep 2024, Robert Elz wrote: ps: Of course, one can almost accomplish this with functions... PATH_TO_BASIC_UTILITIES=/usr/bin/- PATH_TO_ENHANCED_UTILITIES=/usr/bin/+ -() { ${PATH_TO_BASIC_UTILITIES}/"$@" ; } +() { ${PATH_TO_ENHANCED_UTILITIES}/"$@" ; } and then use them as -

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread tlaronde
On Sun, Sep 22, 2024 at 05:03:26PM +0700, Robert Elz wrote: > Date:Sun, 22 Sep 2024 09:09:06 +0200 > From:tlaro...@kergis.com > Message-ID: > > | (whether your test about the first two chars, or the more restricting > | but simplest first an alphanumeric), > > On

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread Robert Elz
| is set, the option can not be set; if posix is set after, the option | is reset to off) with a name of "xpathsearch" or "xfilename", would | seem acceptable? I will find some time next week to try to add it. To do that you're going to want to apply the following patch to mkoptions.sh fir

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread Robert Elz
Date:Sun, 22 Sep 2024 09:09:06 +0200 From:tlaro...@kergis.com Message-ID: | (whether your test about the first two chars, or the more restricting | but simplest first an alphanumeric), On that point, my reasoning is that I can imaging having 2 sets of (some perha

Re: sh(1): POSIX "Command Search and Execution"

2024-09-22 Thread tlaronde
On Sun, Sep 22, 2024 at 04:38:52AM +0700, Robert Elz wrote: > Date:Sat, 21 Sep 2024 09:47:09 +0200 > From:tlaro...@kergis.com > Message-ID: > > | one can reach the answers interpolated searching for '^#TL': > > My mail reader colours quoted text (quoted the standar