Re: MacOS Homebrew bash '5.3.0(1)-release' breaks 'wait' (?)

2025-07-14 Thread John Sidles
> > I was a pretty big part of that discussion, and this looks broken to > me. If 'wait -n' is passed a list of pids, it shouldn't also be > waiting for other background processes that weren't passed to it as > arguments. Is that what you're saying it's doing? > I have more than 100 posix-mode scr

Re: new command dh (dirhistory)

2025-07-14 Thread Zachary Santer
On Mon, Jul 14, 2025 at 7:01 PM jason stein wrote: > > Hi Chet, > thanks for the suggestion. I will update the code when I get a chance to > make dh a loadable builtin. Your patch modified the cd builtin, and would have to modify pushd and popd as well. You could potentially write and load repla

Re: new command dh (dirhistory)

2025-07-14 Thread jason stein
Hi Chet, thanks for the suggestion. I will update the code when I get a chance to make dh a loadable builtin. On Mon, Jul 14, 2025, 12:29 PM Chet Ramey wrote: > On 7/13/25 4:19 PM, jason stein wrote: > > *Per Lawrence **Velázquez* > > Sending a new email to bug-bash@gnu.org. Original was sent

Re: parser bug in Q_ARITH

2025-07-14 Thread Chet Ramey
On 7/14/25 1:07 PM, Zachary Santer wrote: If it makes sense to do this at all, this is probably the way to go. array_expand_once/assoc_expand_once is the only shopt option that jumps out at me as a modification to parser behavior, Besides extglob? -- ``The lyf so short, the craft so long to l

Re: new command dh (dirhistory)

2025-07-14 Thread Chet Ramey
On 7/13/25 4:19 PM, jason stein wrote: *Per Lawrence **Velázquez* Sending a new email to bug-bash@gnu.org. Original was sent to help-bash@gnu-org which Lawrence indicated was the incorrect mailing list (Thanks Lawrence). Hey All, I developed a new builtin and I was wondering what is the process

Re: parser bug in Q_ARITH

2025-07-14 Thread Chet Ramey
On 7/12/25 6:52 PM, Zachary Santer wrote: On Fri, Jul 11, 2025 at 3:13 PM Chet Ramey wrote: This means that arithmetic syntax errors are detected when the expression is evaluated, not when the (( command is parsed. This is due to its origins as syntactic sugar for `let "expression". The [[ co

Re: sourc. can't handle /sys/block/*/uevent on Linux

2025-07-14 Thread Robert Elz
Date:Mon, 14 Jul 2025 10:52:50 -0400 From:Chet Ramey Message-ID: <2702d742-d1d6-4929-9024-028a2d5cf...@case.edu> | One of the assumptions bash makes is that when the kernel tells it the size | of a regular file using stat(2), it's telling the truth, That's entire

Re: MacOS Homebrew bash '5.3.0(1)-release' breaks 'wait' (?)

2025-07-14 Thread Robert Elz
Date:Mon, 14 Jul 2025 10:34:12 -0400 From:Chet Ramey Message-ID: <6a02a36f-d31d-4816-8988-5a4ccf960...@case.edu> | The short story is that `wait -n' now returns the status of any process | that's completed and hasn't been waited for yet, just like `wait'. It's

Re: MacOS Homebrew bash '5.3.0(1)-release' breaks 'wait' (?)

2025-07-14 Thread Zachary Santer
On Mon, Jul 14, 2025 at 11:50 AM Chet Ramey wrote: > > The short story is that `wait -n' now returns the status of any process > that's completed and hasn't been waited for yet, just like `wait'. It's > not restricted to processes that terminates after it's invoked. It does > this even when it's g

Re: parser bug in Q_ARITH

2025-07-14 Thread Zachary Santer
On Sun, Jul 13, 2025 at 1:43 PM Martin D Kealey wrote: >> >> > And then there's POSIX. Does the Austin Group let the peanut gallery >> > into their discussions? >> >> They do (https://www.opengroup.org/austin/), but given how portable >> this currently is... >> >> % cat /tmp/foo.sh >>

Re: sourc. can't handle /sys/block/*/uevent on Linux

2025-07-14 Thread Andreas Schwab
On Jul 14 2025, Chet Ramey wrote: > One of the assumptions bash makes is that when the kernel tells it the size > of a regular file using stat(2), it's telling the truth, and that reading > fewer bytes than that when asking for the entire file indicates some kind > of problem. That's a TOCTOU rac

Re: parser bug in Q_ARITH

2025-07-14 Thread Chet Ramey
On 7/9/25 4:57 PM, Robert Elz wrote: jacaranda$ echo "$BASH_VERSION" 5.3.0(1)-release jacaranda$ unset hash jacaranda$ declare -A hash; key=\'\] jacaranda$ let "hash[\$key]++"; declare -p hash declare -A hash=(["']"]="1" ) So it is still different, just different different. `let' is a builtin

Re: Readline discards the last character of long messages

2025-07-14 Thread Chet Ramey
On 7/12/25 5:30 AM, Torgny Lyon wrote: Bash Version: 5.3 Patch Level: 0 Release Status: maint Description: When formatting long messages that wont fit into its buffer, readline will reallocate the buffer to be just as large as is needed, but it will then not make use

Re: sourc. can't handle /sys/block/*/uevent on Linux

2025-07-14 Thread Chet Ramey
On 7/12/25 12:52 PM, Emanuele Torre wrote: User zen_desu mentioned this bug report on the #bash IRC channel of libera.chat today: https://github.com/desultory/ugrd/pull/328 Basically, in bash 5.3, if you try to source a /sys/block/*/uevent file; example: $ cat /sys/block/sda/uevent MA

Re: MacOS Homebrew bash '5.3.0(1)-release' breaks 'wait' (?)

2025-07-14 Thread Chet Ramey
On 7/13/25 12:37 PM, John Sidles wrote: Bash Version: 5.3 Patch Level: 0 Release Status: release Description: MacOS Homebrew bash '5.3.0(1)-release' (apparently?) breaks 'wait' bash-settings are as follows (in my experiments, the sole critical setting is "posix on") Repeat-By: # SUMMARY: