Re: local -r issue in conjunction with trap

2022-07-15 Thread Lawrence Velázquez
On Fri, Jul 15, 2022, at 7:06 PM, Koichi Murase wrote: > 2022年7月16日(土) 7:28 Lawrence Velázquez : >> You can't shadow a readonly variable: >> >> https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00152.html >> https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00153.html >> https://lists.gnu

Re: local -r issue in conjunction with trap

2022-07-15 Thread Koichi Murase
2022年7月16日(土) 7:28 Lawrence Velázquez : > You can't shadow a readonly variable: > > https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00152.html > https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00153.html > https://lists.gnu.org/archive/html/bug-bash/2020-04/msg00201.html > https://lis

Re: local -r issue in conjunction with trap

2022-07-15 Thread Lawrence Velázquez
On Fri, Jul 15, 2022, at 6:26 PM, Lawrence Velázquez wrote: > it's worth noting that the trap command runs in the context > from which the shell exits Sorry, this might not be clear. Here I am referring to the command that is provided as the argument to the "trap" utility. > not the context in w

Re: local -r issue in conjunction with trap

2022-07-15 Thread Lawrence Velázquez
On Fri, Jul 15, 2022, at 12:13 PM, Robert Stoll wrote: > Following a script to reproduce the problem: > > = > > #!/usr/bin/env bash > set -e > > function trapHook(){ > echo "$1" > local -r readonlyV

local -r issue in conjunction with trap

2022-07-15 Thread Robert Stoll
Hi Unfortunately I have never built bash on my own and it would probably take me too much time to do it. Thus, I am writing to this e-mail in the hope that someone more experienced can try to reproduce it with the latest version. I do hope that my bug-report helps nonetheless to improve bash.