Tilde expansion bug in associative array assignments?

2023-02-06 Thread Marco
I am seeing this potential regression on code checked out from https://git.savannah.gnu.org/git/bash.git at version ec8113b: $ ./configure $ make $ echo "$BASH_VERSION" 5.2.15(1)-release $ declare -A associative_array=([key]=~/Desktop) $ ls -d "${associative_array[key]}" ls: cannot access

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-06 Thread Koichi Murase
2023年2月7日(火) 0:40 Chet Ramey : > On 2/4/23 8:02 PM, Koichi Murase wrote: > > In the previous time that I raised the discussion about ``no-argument > > return in trap handlers'', I directly posted an email to the mailing > > list [1]. Fortunately, I got about ten replies but later, > >

Re: [PATCH] local_builtin: do not overwrite previously saved options with local -

2023-02-06 Thread Dale R. Worley
This is tricky. The documentation is If NAME is '-', the set of shell options is made local to the function in which 'local' is invoked: shell options changed using the 'set' builtin inside the function are restored to their original values when the function returns. It does

Re: [PATCH] local_builtin: do not overwrite previously saved options with local -

2023-02-06 Thread Emanuele Torre
On Mon, Feb 06, 2023 at 10:18:30AM -0500, Dale R. Worley wrote: > The behavior of bash appears to be is "future changes in shell options > using the 'set' builtin inside the current function invocation are > restored to their prior values when the function returns". Perhaps, the wording of the

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-06 Thread Chet Ramey
On 2/4/23 8:02 PM, Koichi Murase wrote: In the previous time that I raised the discussion about ``no-argument return in trap handlers'', I directly posted an email to the mailing list [1]. Fortunately, I got about ten replies but later, unfortunately, it was finally forgotten without any

[PATCH] local_builtin: do not overwrite previously saved options with local -

2023-02-06 Thread Emanuele Torre
Before this patch, running local - a second time in the same scope would overwrite the previously saved options: a () { local -; set -C; echo "2: $-"; local -; set -u; echo "3: $-" ;} echo "1: $-" # 1: himBHs a # 2: himBCHs # 3: himuBCHs echo "4: $-" #

Re: Tilde expansion bug in associative array assignments?

2023-02-06 Thread Chet Ramey
On 2/6/23 7:33 AM, Marco wrote: I am seeing this potential regression on code checked out from https://git.savannah.gnu.org/git/bash.git at version ec8113b: $ ./configure $ make $ echo "$BASH_VERSION" 5.2.15(1)-release $ declare -A associative_array=([key]=~/Desktop) $ ls -d

Re: SIGINT handling during async functions

2023-02-06 Thread Martin D Kealey
On Fri, 3 Feb 2023 at 07:17, Chet Ramey wrote: > On 1/28/23 5:56 AM, Martin D Kealey wrote: > > Firstly, let's just leave aside "POSIX requires this" for a bit. > Be that as it may, POSIX exists and this is a requirement. It's also how > other shells behave. > Of course. I'm only contemplating