Re: sh 'continue' shenanigans: negating

2024-02-15 Thread Chet Ramey via austin-group-l at The Open Group
On 2/14/24 6:40 PM, Christoph Anton Mitterer wrote: On Wed, 2024-02-14 at 09:18 -0500, Chet Ramey via austin-group-l at The Open Group wrote: POSIX requires this, since it says that return sets $? to 1 here. I assume you mean the description of the exit status from `return`? No, I mean

Re: sh 'continue' shenanigans: negating

2024-02-14 Thread Chet Ramey via austin-group-l at The Open Group
On 2/14/24 12:06 AM, Oğuz wrote: On Tuesday, February 13, 2024, Chet Ramey via austin-group-l at The Open Group mailto:austin-group-l@opengroup.org>> wrote: `continue' is a builtin; continue has a return status; `!' says to negate it. It seems easy to come to the conc

Re: sh 'continue' shenanigans: negating

2024-02-13 Thread Chet Ramey via austin-group-l at The Open Group
? `continue' is a builtin; continue has a return status; `!' says to negate it. It seems easy to come to the conclusion that the script should return 1. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc

Re: sh: set -o pipefail by default

2024-01-11 Thread Chet Ramey via austin-group-l at The Open Group
break a large body of existing scripts, and it's not the purpose of the standard. Any implementation can choose to default it to enabled, of course. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc

Re: Request: Standard hashmaps in sh

2023-12-27 Thread Chet Ramey via austin-group-l at The Open Group
, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: bug#65659: RFC: changing printf(1) behavior on %b

2023-09-08 Thread Chet Ramey via austin-group-l at The Open Group
les format strings and arguments into something it passes to printf(3), and that processes them as bytes, the game is over. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.e

Re: bug#65659: RFC: changing printf(1) behavior on %b

2023-09-05 Thread Chet Ramey via austin-group-l at The Open Group
rare enough for an encoded character to contain a backslash that no one has changed it yet. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [Issue 8 drafts 0001771]: support or reserve %q as printf-utility format specifier

2023-09-05 Thread Chet Ramey via austin-group-l at The Open Group
ft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: RFC: changing printf(1) behavior on %b

2023-08-31 Thread Chet Ramey via austin-group-l at The Open Group
change at most. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: $? behaviour after comsub in same command

2023-04-11 Thread Chet Ramey via austin-group-l at The Open Group
On 4/10/23 7:02 PM, Robert Elz wrote: Date:Mon, 10 Apr 2023 10:30:08 -0400 From:Chet Ramey Message-ID: <78038281-f431-775e-6d60-a44126d1d...@case.edu> | The different semantics are that the standard specifies the status of the | simple command in

Re: $? behaviour after comsub in same command

2023-04-10 Thread Chet Ramey via austin-group-l at The Open Group
On 4/6/23 5:59 PM, Robert Elz wrote: Date:Wed, 5 Apr 2023 10:35:58 -0400 From:"Chet Ramey via austin-group-l at The Open Group" Message-ID: | A variant with slightly different semantics: | | (exit 8) | a=4 b=$(exit 42) c=$? | echo stat

Re: $? behaviour after comsub in same command

2023-04-10 Thread Chet Ramey via austin-group-l at The Open Group
ippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: $? behaviour after comsub in same command

2023-04-06 Thread Chet Ramey via austin-group-l at The Open Group
lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: $? behaviour after comsub in same command

2023-04-06 Thread Chet Ramey via austin-group-l at The Open Group
On 4/5/23 12:36 PM, Harald van Dijk wrote: On 05/04/2023 15:35, Chet Ramey via austin-group-l at The Open Group wrote: On 4/5/23 9:06 AM, Martijn Dekker via austin-group-l at The Open Group wrote: Consider: false || echo $(true) $? dash, mksh and yash print 1. bash, ksh93 and zsh print

Re: $? behaviour after comsub in same command

2023-04-05 Thread Chet Ramey via austin-group-l at The Open Group
On 4/5/23 11:25 AM, Oğuz wrote: 5 Nisan 2023 Çarşamba tarihinde Chet Ramey via austin-group-l at The Open Group mailto:austin-group-l@opengroup.org>> yazdı: but should it be set fron the command substitution for the assignment to c? I think it'd be practical, is there a reas

Re: $? behaviour after comsub in same command

2023-04-05 Thread Chet Ramey via austin-group-l at The Open Group
The standard is clear about what $? should be for the echo, but should it be set fron the command substitution for the assignment to c? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.edu

Re: Syntax error with "command . file" (was: [1003.1(2016/18)/Issue7+TC2 0001629]: Shell vs. read(2) errors on the script)

2023-03-14 Thread Chet Ramey via austin-group-l at The Open Group
On 3/14/23 4:58 PM, Harald van Dijk wrote: On 14/03/2023 20:41, Chet Ramey wrote: On 3/12/23 10:19 PM, Harald van Dijk via austin-group-l at The Open Group wrote: bash appears to disables the reading of .profile in POSIX mode entirely. This isn't quite correct. By default, a login shell

Re: Syntax error with "command . file" (was: [1003.1(2016/18)/Issue7+TC2 0001629]: Shell vs. read(2) errors on the script)

2023-03-14 Thread Chet Ramey via austin-group-l at The Open Group
for `strict posix' conformance, or invoke it with POSIXLY_CORRECT or POSIX_PEDANTIC in the environment, and it won't. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu

Re: Writing the "[job] pid" for async and-or lists

2023-02-24 Thread Chet Ramey via austin-group-l at The Open Group
that it doesn't apply to subshell environments. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Writing the "[job] pid" for async and-or lists

2023-02-24 Thread Chet Ramey via austin-group-l at The Open Group
shells conform and which do not. I can't see that happening in time for the next draft. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Minutes of the 6th February 2023 Teleconference

2023-02-09 Thread Chet Ramey via austin-group-l at The Open Group
. But is it the role of a standards body to require that behavior, when shells don't do it today? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Minutes of the 6th February 2023 Teleconference

2023-02-07 Thread Chet Ramey via austin-group-l at The Open Group
On 2/7/23 2:22 AM, Andrew Josey via austin-group-l at The Open Group wrote: Bug 1629: Shell vs. read(2) errors on the script OPEN https://austingroupbugs.net/view.php?id=1629 This item was discussed at length on the call including the feedback from Chet Ramey. Notes were updated

Re: Minutes of the 2nd February 2023 Teleconference

2023-02-04 Thread Chet Ramey via austin-group-l at The Open Group
to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Security risk in uudecode specification?

2023-01-20 Thread Chet Ramey via austin-group-l at The Open Group
nd here we are. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Shell vs. read(2) errors on the script

2023-01-09 Thread Chet Ramey via austin-group-l at The Open Group
long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [Issue 8 drafts 0001564]: clariy on what (character/byte) strings pattern matching notation should work

2022-05-23 Thread Chet Ramey via austin-group-l at The Open Group
? matches a single byte that is not a character... but later on it doesn't work again with \243] and ?] Because, as Harald says, \243] is a valid multibyte character in Big5 locales. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippoc

Re: When can shells remove "known" process IDs from the list?

2022-05-16 Thread Chet Ramey via austin-group-l at The Open Group
- Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-16 Thread Chet Ramey via austin-group-l at The Open Group
On 5/13/22 4:56 PM, Robert Elz wrote: Date:Fri, 13 May 2022 11:22:20 -0400 From:Chet Ramey Message-ID: | Show your work. | | I tested this on macOS 12 and RHEL 7, using interactive shells with job | control enabled, That is likely the difference

Re: When can shells remove "known" process IDs from the list?

2022-05-13 Thread Chet Ramey via austin-group-l at The Open Group
112812 960 pts/1R+ 10:59 0:00 grep sleep [1]+ Terminated sleep 20 | sleep 20 -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-13 Thread Chet Ramey via austin-group-l at The Open Group
On 5/13/22 10:27 AM, Geoff Clare via austin-group-l at The Open Group wrote: Chet Ramey wrote, on 13 May 2022: On 5/13/22 5:20 AM, Geoff Clare via austin-group-l at The Open Group wrote: The definition of "Job" is: A set of processes, comprising a shell pipeline, and any

Re: When can shells remove "known" process IDs from the list?

2022-05-13 Thread Chet Ramey via austin-group-l at The Open Group
so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-13 Thread Chet Ramey via austin-group-l at The Open Group
so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-13 Thread Chet Ramey via austin-group-l at The Open Group
you implemented the UPE. You still needed a way to keep track of background processes, and the known IDs list was it. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.

Re: wait and stopped processes (was: When can shells remove "known" process IDs from the list?)

2022-05-13 Thread Chet Ramey via austin-group-l at The Open Group
.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-11 Thread Chet Ramey via austin-group-l at The Open Group
de the known IDs list. > > I think kre intended it apply to the known IDs list as well, and I > was agreeing with that. So for the known IDs list, it's pretty much `wait' and `jobs', right? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars long

Re: wait and stopped processes (was: When can shells remove "known" process IDs from the list?)

2022-05-11 Thread Chet Ramey via austin-group-l at The Open Group
On 5/10/22 11:50 AM, Geoff Clare via austin-group-l at The Open Group wrote: > Chet Ramey wrote, on 06 May 2022: >> >>>> And last, also in this area, is the question of stopped jobs and the wait >>>> command, and how those two are intended to interact. >>>

Re: When can shells remove "known" process IDs from the list?

2022-05-11 Thread Chet Ramey via austin-group-l at The Open Group
yf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-06 Thread Chet Ramey via austin-group-l at The Open Group
Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-06 Thread Chet Ramey via austin-group-l at The Open Group
e the shell to wait until the process terminates. Bash provides an option (`wait -f') to force a wait for process termination. I didn't check whether other shells do. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTe

Re: When can shells remove "known" process IDs from the list?

2022-05-06 Thread Chet Ramey via austin-group-l at The Open Group
ctice. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-06 Thread Chet Ramey via austin-group-l at The Open Group
``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: When can shells remove "known" process IDs from the list?

2022-05-06 Thread Chet Ramey via austin-group-l at The Open Group
``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: 答复: How do I get the buffered bytes in a FILE *?

2022-04-18 Thread Chet Ramey via austin-group-l at The Open Group
On 4/18/22 12:53 AM, Rob Landley wrote: On 4/17/22 18:10, Chet Ramey wrote: On 4/16/22 2:58 PM, Rob Landley via austin-group-l at The Open Group wrote: Q) "How do I switch from FILE * to fd via fileno() without losing data." A) "Don't use FILE *" That's not the question I

Re: 答复: How do I get the buffered bytes in a FILE *?

2022-04-17 Thread Chet Ramey via austin-group-l at The Open Group
fered input package to satisfy the POSIX read ahead requirements than try to coerce stdio into doing it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Another "is it quoted" issue for here doc redir op end words

2022-02-06 Thread Chet Ramey via austin-group-l at The Open Group
it is fir all other redirects (which definitely does not happen). That's the aforementioned rabbit hole. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Another "is it quoted" issue for here doc redir op end words

2022-02-06 Thread Chet Ramey via austin-group-l at The Open Group
.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: how do to cmd subst with trailing newlines portable (was: does POSIX mandate whether the output…)

2022-01-27 Thread Chet Ramey via austin-group-l at The Open Group
On 1/27/22 12:25 PM, Chet Ramey wrote: On 1/27/22 12:07 PM, Harald van Dijk via austin-group-l at The Open Group wrote: On 27/01/2022 16:06, Chet Ramey via austin-group-l at The Open Group wrote: Wow, that seems like a bug. Environment variables can contain sequences of arbitrary non-NULL

Re: how do to cmd subst with trailing newlines portable (was: does POSIX mandate whether the output…)

2022-01-27 Thread Chet Ramey via austin-group-l at The Open Group
On 1/27/22 12:07 PM, Harald van Dijk via austin-group-l at The Open Group wrote: On 27/01/2022 16:06, Chet Ramey via austin-group-l at The Open Group wrote: Wow, that seems like a bug. Environment variables can contain sequences of arbitrary non-NULL bytes, and, as long as the portion before

Re: how do to cmd subst with trailing newlines portable (was: does POSIX mandate whether the output…)

2022-01-27 Thread Chet Ramey via austin-group-l at The Open Group
ue because there are sequences that don't form valid wide characters, that sounds like a problem. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [Issue 8 drafts 0001505]: Make doesn't seem to specify unset macro expansion behaviour

2021-12-17 Thread Chet Ramey via austin-group-l at The Open Group
standardizing behavior that no one implements because of a desire for possible future improvement. That's what gives standards bodies a bad name. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.edu

Re: [Issue 8 drafts 0001505]: Make doesn't seem to specify unset macro expansion behaviour

2021-12-17 Thread Chet Ramey via austin-group-l at The Open Group
ead enough to devise and require a hypothetical fix in make? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [Issue 8 drafts 0001505]: Make doesn't seem to specify unset macro expansion behaviour

2021-12-16 Thread Chet Ramey via austin-group-l at The Open Group
On 12/16/21 5:27 AM, Geoff Clare via austin-group-l at The Open Group wrote: > Chet Ramey wrote, on 14 Dec 2021: >> >> On 12/14/21 5:15 AM, Geoff Clare via austin-group-l at The Open Group wrote: >>> Paul Smith wrote, on 13 Dec 2021: >>>> Why shouldn't we just

Re: [Issue 8 drafts 0001505]: Make doesn't seem to specify unset macro expansion behaviour

2021-12-14 Thread Chet Ramey via austin-group-l at The Open Group
plementation that throws an error when expanding an unset variable? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: $? in a simple command with no command name

2021-09-01 Thread Chet Ramey via austin-group-l at The Open Group
On 9/1/21 4:59 PM, (Joerg Schilling) wrote: "Chet Ramey via austin-group-l at The Open Group" wrote: Given the following: (exit 42) a=$? b=`false` b=$? echo $? $a $b Bash prints 1 42 1. The original (v7) bourne shell and the rest of the research line through v9 prints 1 1

Re: $? in a simple command with no command name

2021-09-01 Thread Chet Ramey via austin-group-l at The Open Group
VR4.2 shell prints 1 42 1. I imagine the rest of the SVR4 line sh is the same. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: utilities and write errors

2021-06-30 Thread Chet Ramey via austin-group-l at The Open Group
ehavior is unspecified." Everyone is conformant here. There is unspecified behavior. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: utilities and write errors

2021-06-30 Thread Chet Ramey via austin-group-l at The Open Group
long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: behavior of printf '\x61'

2021-04-16 Thread Chet Ramey via austin-group-l at The Open Group
', 'x61'). I consider hex output a valid extension, but others probably will not. I believe it's a defect in the standard, though. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: execve(2) optimisation for last command

2021-04-15 Thread Chet Ramey via austin-group-l at The Open Group
they've executed the last command. (In a nutshell, that's what bash does.) Commands executed with -c don't have this limitation. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp

Re: [Shell Command Language][shortcomings of command utlity][improving robustness of POSIX shells]

2021-04-13 Thread Chet Ramey via austin-group-l at The Open Group
exec family of functions." That said, this is the most marginal of corner cases, notwithstanding that bash has a distinct option to handle it (disabled by default). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet R

Re: [Shell Command Language][shortcomings of command utlity][improving robustness of POSIX shells]

2021-04-12 Thread Chet Ramey via austin-group-l at The Open Group
. If it wanted. You just described basically how macOS runs Intel binaries on M1 hardware, and how Intel hardware ran PowerPC binaries before that. No mystery here. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech

Re: [Shell Command Language][shortcomings of command utlity][improving robustness of POSIX shells]

2021-04-12 Thread Chet Ramey via austin-group-l at The Open Group
to make themselves nonconforming, I do not see it as an endorsement or allowance. This is just wrong. By this definition, every shell is non-conforming. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: [1003.1(2016/18)/Issue7+TC2 0001454]: Conflict between "case" description and grammar

2021-02-19 Thread Chet Ramey via austin-group-l at The Open Group
On 2/19/21 3:32 PM, Robert Elz wrote: Date:Fri, 19 Feb 2021 14:30:25 -0500 From:Chet Ramey Message-ID: <2b32112c-de72-c713-3f87-6840828c3...@case.edu> | Nope, it's consistent with the standard. I can understand that argument. | that's not a fair r

Re: [1003.1(2016/18)/Issue7+TC2 0001454]: Conflict between "case" description and grammar

2021-02-19 Thread Chet Ramey via austin-group-l at The Open Group
ita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016/18)/Issue7+TC2 0001454]: Conflict between "case" description and grammar

2021-02-19 Thread Chet Ramey via austin-group-l at The Open Group
evis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016/18)/Issue7+TC2 0001454]: Conflict between "case" description and grammar

2021-02-19 Thread Chet Ramey via austin-group-l at The Open Group
- Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016/18)/Issue7+TC2 0001454]: Conflict between "case" description and grammar

2021-02-19 Thread Chet Ramey via austin-group-l at The Open Group
, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016/18)/Issue7+TC2 0001454]: Conflict between "case" description and grammar

2021-02-19 Thread Chet Ramey via austin-group-l at The Open Group
not return the token for `esac'? Or are you saying that is not converted to an Esac? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Bug 1393 ("command" declaration utility) possible solution

2021-01-10 Thread Chet Ramey via austin-group-l at The Open Group
has any plans of changing that now. I currently do not. I have other priorities. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016/18)/Issue7+TC2 0001418]: Add options to ulimit to match get/setrlimit()

2020-11-20 Thread Chet Ramey via austin-group-l at The Open Group
it's the most reasonable. I will look to add it, or something along these lines, in bash-5.2. It's too late for bash-5.1. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp

Re: [1003.1(2016/18)/Issue7+TC2 0001418]: Add options to ulimit to match get/setrlimit()

2020-11-17 Thread Chet Ramey via austin-group-l at The Open Group
On 11/17/20 10:56 AM, Geoff Clare via austin-group-l at The Open Group wrote: Chet Ramey wrote, on 17 Nov 2020: On 11/17/20 10:14 AM, Geoff Clare via austin-group-l at The Open Group wrote: Maybe you could handle those by seeing that the option argument is alphabetic (and not "unli

Re: [1003.1(2016/18)/Issue7+TC2 0001418]: Add options to ulimit to match get/setrlimit()

2020-11-17 Thread Chet Ramey via austin-group-l at The Open Group
ach option separately; that is, grouping option letters (for example, −fH) need not be recognized by all implementations. to my proposal. Sure, that would work. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, U

Re: [1003.1(2016/18)/Issue7+TC2 0001418]: Add options to ulimit to match get/setrlimit()

2020-11-17 Thread Chet Ramey via austin-group-l at The Open Group
On 11/17/20 4:53 AM, Geoff Clare via austin-group-l at The Open Group wrote: Chet Ramey wrote, on 16 Nov 2020: On 11/16/20 11:05 AM, Geoff Clare via austin-group-l at The Open Group wrote: Chet Ramey wrote, on 16 Nov 2020: Thanks. Looks like bash is parsing the ulimit options

Re: [1003.1(2016/18)/Issue7+TC2 0001418]: Add options to ulimit to match get/setrlimit()

2020-11-16 Thread Chet Ramey via austin-group-l at The Open Group
On 11/16/20 11:05 AM, Geoff Clare via austin-group-l at The Open Group wrote: Chet Ramey wrote, on 16 Nov 2020: Thanks. Looks like bash is parsing the ulimit options in an unusual way instead of using getopt() or similar. Quite the opposite. The bash ulimit builtin uses the same

Re: [1003.1(2016/18)/Issue7+TC2 0001418]: Add options to ulimit to match get/setrlimit()

2020-11-16 Thread Chet Ramey via austin-group-l at The Open Group
lowed by at most one option that takes an option-argument, should be accepted when grouped behind one '-' delimiter." -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tisww

Re: Status of $'...' addition (was: ksh93 job control behaviour)

2020-07-30 Thread Chet Ramey
er ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: sh: aliases in command substitutions

2020-04-23 Thread Chet Ramey
On 4/23/20 1:08 PM, Robert Elz wrote: > Date:Thu, 23 Apr 2020 11:48:55 -0400 > From: Chet Ramey > Message-ID: > > | Keep in mind that those tests are mutually incompatible > > I didn't see anything I would call that. When run as a sing

Re: sh: aliases in command substitutions

2020-04-23 Thread Chet Ramey
l. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: aliases in command substitutions

2020-04-20 Thread Chet Ramey
h me right now, that the same text appeared in the 1992 version of the standard. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: pwd(1) pwd -L and multple adjacent slashes in $PWD,

2020-04-14 Thread Chet Ramey
ly, at least `cd' is >> explicitly unspecified, and since `pwd' is only required to "remove >> unnecessary slash characters" if -P is supplied, I'd say you've left the >> realm of the standard and the implementation can do what it likes. > > > So you are saying that it would be fine to squish out the additional > slashed in the output? (Not doing anything would be fine, too) Yes. It's unspecified. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: pwd(1) pwd -L and multple adjacent slashes in $PWD,

2020-04-14 Thread Chet Ramey
assign it directly, at least `cd' is explicitly unspecified, and since `pwd' is only required to "remove unnecessary slash characters" if -P is supplied, I'd say you've left the realm of the standard and the implementation can do what it likes. -- ``The lyf so short, the craft so

Re: XCU: 'return' from subshell

2020-03-13 Thread Chet Ramey
t; If that also works in all shells (meaning it doesn't print no, and does > print 7), then by all means standardise it. I can't find one that doesn't in my quick initial testing, but I don't have binaries for every shell under the sun. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: XCU: 'return' from subshell

2020-03-13 Thread Chet Ramey
e f() { (return 1) } case as well, and seems to work in all shells. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: XCU: 'return' from subshell

2020-03-12 Thread Chet Ramey
dard, such as https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01 steps 1 and 2. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: XCU: 'return' from subshell

2020-03-12 Thread Chet Ramey
on. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: XCU: 'return' from subshell

2020-03-12 Thread Chet Ramey
On 3/11/20 1:07 PM, Dirk Fieldhouse wrote: > On 11/03/20 15:23, Chet Ramey wrote: >> ...> >> What does a `return from the execution environment' mean, exactly? ... > > To clarify, what I wrote was shorthand for "return from the function if > the 'return' i

Re: XCU: 'return' from subshell

2020-03-12 Thread Chet Ramey
as an unnecessary change. We can use 842 as a model for the changes. Someone needs to propose new wording that's comprehensive enough to cover the different cases. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocra

Re: XCU: 'return' from subshell

2020-03-12 Thread Chet Ramey
On 3/12/20 6:02 AM, Joerg Schilling wrote: > Chet Ramey wrote: > >> I use Mac OS X. I test on Linux. >> >> By far, the biggest difference between older Mac OS X/Linux and current Mac >> OS X is using lldb instead of gdb for debugging. > > OK, I develop on

Re: XCU: 'return' from subshell

2020-03-11 Thread Chet Ramey
On 3/11/20 11:52 AM, Joerg Schilling wrote: > Chet Ramey wrote: > >> On 3/11/20 11:46 AM, Joerg Schilling wrote: >> >>> Since you most likely develop on Linux >> >> I don't; don't make assumptions. > > Interesting, where do you develop? I use Ma

Re: XCU: 'return' from subshell

2020-03-11 Thread Chet Ramey
On 3/11/20 11:46 AM, Joerg Schilling wrote: > Since you most likely develop on Linux I don't; don't make assumptions. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduh

Re: XCU: 'return' from subshell

2020-03-11 Thread Chet Ramey
On 3/11/20 11:30 AM, Joerg Schilling wrote: > Chet Ramey wrote: > >>> and that "foo" and not >>> "bar" should be printed in each case: >>> >>> f1() { >>>   ( echo foo; return ) >>>   echo bar >>> } >&

Re: XCU: 'return' from subshell

2020-03-11 Thread Chet Ramey
On 3/11/20 11:13 AM, Stephane Chazelas wrote: > 2020-03-11 09:55:57 -0400, Chet Ramey: >> On 3/11/20 5:43 AM, Stephane Chazelas wrote: >> >>> AFAIK, bash and bosh are the only shells that complain when you >>> use return outside of functions/sourced scripts

Re: XCU: 'return' from subshell

2020-03-11 Thread Chet Ramey
On 3/11/20 11:13 AM, Stephane Chazelas wrote: > 2020-03-11 09:55:57 -0400, Chet Ramey: >> On 3/11/20 5:43 AM, Stephane Chazelas wrote: >> >>> AFAIK, bash and bosh are the only shells that complain when you >>> use return outside of functions/sourced scripts

Re: XCU: 'return' from subshell

2020-03-11 Thread Chet Ramey
On 3/11/20 10:49 AM, Dirk Fieldhouse wrote: > On 11/03/20 14:03, Chet Ramey wrote: >>...> >> So what's the goal here? That the function continue execution in the >> subshell so `return' has consistent, if baffling, semantics? That we >> tighten up the language to

Re: XCU: 'return' from subshell

2020-03-11 Thread Chet Ramey
The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: XCU: 'return' from subshell

2020-03-11 Thread Chet Ramey
onformance bug). You really should try posix mode. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2004)/Issue 6 0000267]: time (keyword)

2020-02-18 Thread Chet Ramey
, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2004)/Issue 6 0000267]: time (keyword)

2020-02-18 Thread Chet Ramey
On 2/18/20 10:36 AM, Robert Elz wrote: > Date:Tue, 18 Feb 2020 09:58:32 -0500 > From: Chet Ramey > Message-ID: <22f16ef4-41cf-60b0-5968-f608dc988...@case.edu> > > | The 1992 version of the standard knew about time, standardized it as

Re: [1003.1(2004)/Issue 6 0000267]: time (keyword)

2020-02-18 Thread Chet Ramey
haucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2004)/Issue 6 0000267]: time (keyword)

2020-02-18 Thread Chet Ramey
so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

  1   2   3   >