On Sun, Sep 22, 2024 at 06:58:25PM +0700, Robert Elz wrote:
> Date: Sun, 22 Sep 2024 13:13:19 +0200
> From: [email protected]
> Message-ID: <[email protected]>
>
> | 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 the option.
>
> No, there would need to be some other mechanism, probably an environment
> var (like -o posix, and POSIXLY_CORRECT) to enable it in other functions.
>
> But if you're not going to be able to have "xargs foo/bar" work, or
> set EDITOR to foo/bar and have that work, then I don't think any of
As for EDITOR, or others, the trick is to use "command -v" when
setting the variable.
xargs $(command -v bar/foo) ...
It's a limited addition, that can be useful 90% of the time. For the 10
remaining percents, it is as usual: a limited bonus for a significant
code modification.
I will start by the simplest.
--
Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
http://www.kergis.com/
http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.