Re: functions can fully unset local vars in other scopes

2022-08-01 Thread Chet Ramey
On 8/1/22 3:38 PM, Robert E. Griffith wrote: I just finished reading that 2018 discussion and the current discussion. Its hard for me to understand why this is an issue. kre's use case was    unset X    y=$X He called it 'braindead' for it to do anything expect to assign NULL/empty to Y but

Re: functions can fully unset local vars in other scopes

2022-08-01 Thread Robert E. Griffith
I just finished reading that 2018 discussion and the current discussion. Its hard for me to understand why this is an issue. kre's use case was unset X y=$X He called it 'braindead' for it to do anything expect to assign NULL/empty to Y but I think that is far from true. If he's thinking

Re: 5.1 regression?

2022-08-01 Thread Chet Ramey
On 8/1/22 4:17 AM, Robert Elz wrote: | a colleague pointed me to a changed behavior of bash 5.1.4 in Debian 11. The change is probably related to a change in the way bash implements here documents (temp files vs pipes), but Here's the first message in the thread that prompted that change:

Re: functions can fully unset local vars in other scopes

2022-08-01 Thread Chet Ramey
On 7/30/22 8:05 AM, Kerin Millar wrote: What consideration was given to creating “local --unset *VAR*” or “unset --local *VAR*” or some other equivalent that doesn't overload any existing command form? Obviously, only Chet can meaningfully respond to this. I mentioned the existence of the opt

Re: Missing word in rluser.texi

2022-08-01 Thread Chet Ramey
On 7/31/22 4:49 PM, pan...@gmail.com wrote: Description: There's a missing word in rluser.texi Repeat-By: N/A Fix: 800c800 < bindings in a format that can put directly into an initialization file. --- > bindings in a format that can be put direct

Re: 5.1 regression?

2022-08-01 Thread Greg Wooledge
On Mon, Aug 01, 2022 at 04:37:18PM +0900, Dominique Martinet wrote: > Harald Dunkel wrote on Mon, Aug 01, 2022 at 09:08:40AM +0200: > > a colleague pointed me to a changed behavior of bash 5.1.4 in Debian 11. > > > > #! /bin/bash > > # set -x > > > > insert() > > { > >local data="$1" > >

Re: 5.1 regression?

2022-08-01 Thread Robert Elz
Date:Mon, 1 Aug 2022 09:08:40 +0200 From:Harald Dunkel Message-ID: <0b0342b5-be15-ebc4-989f-a0cc9ec6c...@aixigo.com> | a colleague pointed me to a changed behavior of bash 5.1.4 in Debian 11. The change is probably related to a change in the way bash implements her

Re: 5.1 regression?

2022-08-01 Thread Dominique Martinet
Harald Dunkel wrote on Mon, Aug 01, 2022 at 09:08:40AM +0200: > a colleague pointed me to a changed behavior of bash 5.1.4 in Debian 11. > Would you mind to take a look at this code? > > > #! /bin/bash > # set -x > > insert() > { >local data="$1" >local lineNumber="$2" > >head -

5.1 regression?

2022-08-01 Thread Harald Dunkel
Hi folks, a colleague pointed me to a changed behavior of bash 5.1.4 in Debian 11. Would you mind to take a look at this code? #! /bin/bash # set -x insert() { local data="$1" local lineNumber="$2" head -n "$lineNumber" echo ' ' cat <<< "$data" echo ' ' cat } t