Re: string substitution broken since 5.2

2022-11-03 Thread Koichi Murase
2022年11月4日(金) 8:48 Greg Wooledge : > On Thu, Nov 03, 2022 at 05:20:52PM -0400, Greg Wooledge wrote: > > On Fri, Nov 04, 2022 at 04:09:10AM +0900, Koichi Murase wrote: > > > When one wants to also support Bash 4.2, one possible workaround is to > > > assign the result to a variable (without quoting

Re: string substitution broken since 5.2

2022-11-03 Thread Greg Wooledge
On Thu, Nov 03, 2022 at 05:20:52PM -0400, Greg Wooledge wrote: > On Fri, Nov 04, 2022 at 04:09:10AM +0900, Koichi Murase wrote: > > When one wants to also support Bash 4.2, one possible workaround is to > > assign the result to a variable (without quoting the right-hand side > > of the

Re: string substitution broken since 5.2

2022-11-03 Thread Greg Wooledge
On Fri, Nov 04, 2022 at 04:09:10AM +0900, Koichi Murase wrote: > When one wants to also support Bash 4.2, one possible workaround is to > assign the result to a variable (without quoting the right-hand side > of the assignment): > > $ bash-4.2 -c 'string=\"hi\"; string=${string//\"/\}; echo

Re: bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-11-03 Thread Chet Ramey
On 10/29/22 1:50 AM, Martin D Kealey wrote: PS: While we're about it, can we please fix the expansion of « a/*/b/c/d/* » so it only calls readdir on a/ and each dir matching a/*/b/c/d/ and NOT call readdir on dirs matching a/*/, a/*/b/, or a/*/b/c/. It already does this. Given $ find .

Re: string substitution broken since 5.2

2022-11-03 Thread Koichi Murase
2022年11月4日(金) 3:46 Greg Wooledge : > On Fri, Nov 04, 2022 at 03:31:44AM +0900, Koichi Murase wrote: > > [...] > > > > Another option is to quote `&' in the replacement if you want to make > > it work regardless of the 5.2 feature, patsub_replacement: > > > > string="${string//\"/\}" > > Sadly,

Re: string substitution broken since 5.2

2022-11-03 Thread Chet Ramey
On 11/3/22 1:32 PM, thierryb--- via Bug reports for the GNU Bourne Again SHell wrote: Bash Version: 5.2 Patch Level: 2 Release Status: release Description: String substitution code running for years is broken in 5.2. Repeat-By: string = 'xdotool type "sudo apt update"'

Re: string substitution broken since 5.2

2022-11-03 Thread Greg Wooledge
On Fri, Nov 04, 2022 at 03:31:44AM +0900, Koichi Murase wrote: > 2022年11月4日(金) 2:50 Andreas Schwab : > > On Nov 03 2022, thierryb--- via Bug reports for the GNU Bourne Again SHell > > wrote: > > > Description: > > > String substitution code running for years is broken in 5.2. > > > > > >

Re: string substitution broken since 5.2

2022-11-03 Thread Thierry B.
Le 03/11/2022 à 18:49, Andreas Schwab a écrit : shopt -u patsub_replacement OK thanks, I read the 5.2 release notes. I just regret that this option is enabled by default, it will break many scripts running since years. -- Thierry Bothorel OpenPGP_0x81BB850F60BA2BC2.asc Description:

Re: string substitution broken since 5.2

2022-11-03 Thread Koichi Murase
2022年11月4日(金) 2:50 Andreas Schwab : > On Nov 03 2022, thierryb--- via Bug reports for the GNU Bourne Again SHell > wrote: > > Description: > > String substitution code running for years is broken in 5.2. > > > > Repeat-By: > > string = 'xdotool type "sudo apt update"' > >

Re: string substitution broken since 5.2

2022-11-03 Thread Andreas Schwab
On Nov 03 2022, thierryb--- via Bug reports for the GNU Bourne Again SHell wrote: > Description: > String substitution code running for years is broken in 5.2. > > Repeat-By: > string = 'xdotool type "sudo apt update"' > string="${string//\"/}" > printf '%s' "$string" > >

string substitution broken since 5.2

2022-11-03 Thread thierryb--- via Bug reports for the GNU Bourne Again SHell
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux thierrybo-desk 6.0.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.5-1