Re: Bash-5.2-alpha available

2022-03-22 Thread Chet Ramey
On 3/11/22 3:35 AM, Andreas Schwab wrote: This is still mixing up undo history: I took it out. I could not make it work the way I wanted it to without more extensive changes to the rest of readline than I was willing to make. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: 5.2-alpha completion script source crash

2022-03-22 Thread Chet Ramey
On 3/21/22 6:33 PM, konsolebox wrote: On Sat, Feb 19, 2022 at 9:34 PM Chet Ramey wrote: Thanks for the report. This is the result of needing to clean up parser state before recursively calling it to parse the command substitution. Just tested devel. This one's fixed as well. That was the i

Re: Bash-5.2-alpha available

2022-03-22 Thread Andreas Schwab
I still see clobbered history lines: bash-5.2$ history 1 echo 1 2 echo 2 3 echo 3 4 history Type e, *2, bash-5.2$ echo 2 2 bash-5.2$ history 1 echo 1 2 echo 2 3* echo 2 4 history 5 echo 2 6 history Line 3 should not be modified just because

Re: Bash-5.2-alpha available

2022-03-22 Thread Chet Ramey
On 3/22/22 10:00 AM, Andreas Schwab wrote: I still see clobbered history lines: I took it out. That version isn't in the devel branch yet. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@ca

Re: for loop over parameter expansion of array can miss resulted empty list

2022-03-22 Thread L A Walsh
On 2022/03/21 03:40, Alex fxmbsw7 Ratchev wrote: i solve this by shopt -s nullglob Repeat-By: Code: x=("/"); for i in "${x[@]%/}"; do echo "i is '$i'"; done Result: none Expected result: i is '' if you have nullglob set, then that is not the correct result. I used: #!/bin/bas

Re: [Bug Report] The Unexpected Behavior When Using ANSI Escape Code

2022-03-22 Thread L A Walsh
On 2022/03/20 02:20, Michaelll Lee wrote: When ``PS1’’ environment variable contains the ANSI escape codes, Bash will behavior unexpectedly when Copy&Paste the content from clipboard using Ctrl+V. This unexpected behaviour could be easily reproduced in a few steps. Reproduceable steps are: 1) $

Re: for loop over parameter expansion of array can miss resulted empty list

2022-03-22 Thread Lawrence Velázquez
On Tue, Mar 22, 2022, at 4:53 PM, L A Walsh wrote: > On 2022/03/21 03:40, Alex fxmbsw7 Ratchev wrote: >> i solve this by shopt -s nullglob >> >>> >>> Repeat-By: >>>Code: x=("/"); for i in "${x[@]%/}"; do echo "i is '$i'"; done >>>Result: none >>>Expected result: i is '' >>> > if

Re: parameter expansion null check fails for arrays when [*] or [@] is used

2022-03-22 Thread L A Walsh
On 2022/03/21 05:45, Andreas Luik wrote: Description: Bash fails to correctly test for parameter to be unset or null when the parameter is an array reference [*] or [@]. Repeat-By: myvar[0]= echo "${myvar[0]:+nonnull}" -> OK echo "${myvar[*]:+nonnull}" nunnull -> not OK, because "${my

Re: for loop over parameter expansion of array can miss resulted empty list

2022-03-22 Thread L A Walsh
On 2022/03/22 13:53, L A Walsh wrote: On 2022/03/21 03:40, Alex fxmbsw7 Ratchev wrote: i solve this by shopt -s nullglob Repeat-By: Code: x=("/"); for i in "${x[@]%/}"; do echo "i is '$i'"; done Result: none Expected result: i is '' BTW -- try adding "-u" on your bas

Re: for loop over parameter expansion of array can miss resulted empty list

2022-03-22 Thread L A Walsh
On 2022/03/22 14:04, Lawrence Velázquez wrote: On Tue, Mar 22, 2022, at 4:53 PM, L A Walsh wrote: On 2022/03/21 03:40, Alex fxmbsw7 Ratchev wrote: i solve this by shopt -s nullglob Repeat-By: Code: x=("/"); for i in "${x[@]%/}"; do echo "i is '$i'"; done Result: none

Re: for loop over parameter expansion of array can miss resulted empty list

2022-03-22 Thread Greg Wooledge
On Tue, Mar 22, 2022 at 08:05:21PM -0700, L A Walsh wrote: > > > > > Repeat-By: > > > > >Code: x=("/"); for i in "${x[@]%/}"; do echo "i is '$i'"; done > > > > >Result: none > > > > >Expected result: i is '' > Sorry, I got sidetracked. In this case it wouldn't matter, > if you have n

Re: for loop over parameter expansion of array can miss resulted empty list

2022-03-22 Thread Lawrence Velázquez
On Tue, Mar 22, 2022, at 11:05 PM, L A Walsh wrote: > On 2022/03/22 14:04, Lawrence Velázquez wrote: >> On Tue, Mar 22, 2022, at 4:53 PM, L A Walsh wrote: >> >>> On 2022/03/21 03:40, Alex fxmbsw7 Ratchev wrote: >>> i solve this by shopt -s nullglob > Repeat-By: