Re: Fwd: Re: interactive shell detection in shrc

2024-09-29 Thread Mouse
> But in general, no, there's probably not a lot of use for it, but nor > is there any particular reason to add special case code to prohibit > it. I was thinking, most languages have names for functions and such, but sh is one of the few languages in which a zero-length routine name is even repre

Re: Fwd: Re: interactive shell detection in shrc

2024-09-29 Thread Robert Elz
Date:Sun, 29 Sep 2024 23:59:48 + (UTC) From:RVP Message-ID: | This is _very_ surprising; esp. when /bin/sh doesn't allow chars. | like `/' and `.' in the function name. Huh? sh $ a.v() echo I have a dot in my name sh $ a.v I have a dot in my name You can

Re: Fwd: Re: interactive shell detection in shrc

2024-09-29 Thread RVP
On Wed, 25 Sep 2024, Robert Elz wrote: In NetBSD's sh you can actually do ''() { echo nothing; } (where the function body can be anything of course), then the empty-string command (as distinct from absent command) does exist, and works, but I would not recommend this to anyone, it isn'

Re: sh(1) read: add LINE_MAX safeguard and "-n" option

2024-09-29 Thread Edgar Fuß
As I understand, the performance problem of the read built-in utility originates from its need to read one byte at a time in order not to swallow input it doesn't process. Would it make sense to add an "exclusive" option (call it "-x" for now) to read, where "read -x" essentially means "I promi

[PATCH] Allow qualified filename (bar/foo) PATH searching.

2024-09-29 Thread tlaronde
POSIX requires that PATH searching be done only if the identifier (aka "file") has no '/' (if it has, it is a "path"). Allow searching qualified filenames, i.e. Resource Identifier, like dk/ctl, vect/in/dxf by setting an environment variable PATH_SEARCH_OPT with the setting 'Q' in the definiti

posix_spawnp(3) not checking for empty file name

2024-09-29 Thread tlaronde
If the execvp(3) checks that the name passed is not the empty string, posix_spawnp(3) doesn't with the file argument. Is it intended? -- Thierry Laronde http://www.kergis.com/ http://kertex.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 2