Re: Command "read -N " doesn't respect UTF-8 encoding

2020-10-26 Thread Chet Ramey
On 10/24/20 3:51 PM, i...@kablex.ru wrote:

> Bash Version: 4.3
> Patch Level: 30
> Release Status: release
> 
> Description:
> UTF-8 string piped to read command goes corrupt with -N option, e.g.
>   printf "привет"|(read -N 100500 var_text; printf  "$var_text" )
>  returns some corrupt output "�#��#��#��#��#��#�"

Thanks for the report. This was fixed in bash-5.0.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: Bash-5.1-rc1 available

2020-10-26 Thread Chet Ramey
On 10/20/20 4:44 PM, Bob Proulx wrote:
> Chet Ramey wrote:
>> This release fixes several outstanding bugs in bash-5.0 and introduces
>> several new features.
> 
> An unlisted change (I couldn't locate it in the changes) is that
> 'reverse-search-history (C-r)' now highlights the search pattern.

You quoted it in your message:

f. New active mark and face feature: when enabled, it will highlight the text
   inserted by a bracketed paste (the `active region') and the text found by
   incremental and non-incremental history searches.

>  Is
> that because it is the search pattern or because it now sets the region?

Because it sets the region, and when bracketed paste mode is enabled, the
new active region feature is enabled.

> I find the reverse video highlight to be very difficult to read.  For
> me it is extreme eye strain.  Is there a way to disable the reverse
> video?  For both the paste text and the search text?

Yes, you can disable bracketed paste mode. I'll make sure that turning off
bracketed paste mode disables the active region for incremental searches.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: issue with vredir6.sub and AIX - bash (sub-shell) is crashing durig manual replication of test

2020-10-26 Thread Chet Ramey
On 10/24/20 1:17 PM, Michael Felt wrote:
> OK. Thanks for the reply - and apologies for slow response.
> 
> I was expecting a summary of the test results. I thought the other
> projects you lead ended with test summaries.

No, there have never been summaries.

> If you care to help me find where the wrong error number is being
> returned I'll try and come up with a PR to fix this test for AIX. If
> not, we can consider this thread 'closed'.

It's just AIX interpreting the error condition differently. I think
POSIX permits both interpretations. Since bash just prints the error
message corresponding to errno, and the test is ensuring that the shell
prints an error message on this condition, it's dependent on what the
system call returns. I don't think it's worth trying to work around it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Behavior change

2020-10-26 Thread Gregory Heytings via Bug reports for the GNU Bourne Again SHell



Hi,

I just installed Bash 5.1 rc1.  I have IGNOREEOF set, and in 5.0 (and 
earlier version) when pressing C-d one sees:


$ Use "logout" to leave the shell.

With 5.1 rc1 there is a newline between the prompt and the message:

$
Use "logout" to leave the shell.

Is this change intentional?

Thanks.



Bash 5 increase in RAM from loop with many interations that append to file

2020-10-26 Thread Scott Kostyshak
The following example uses more peak RAM on new bash versions than old versions:

for i in {1..100}; do
  echo "${i}" >> example.txt
done

By measuring peak memory usage with time (/usr/bin/time -f "%E %P %M"),
I get that newer versions of Bash use about 284M, where older versions
use about 191M.

Is this perceived increase in memory usage worth looking more into or is
it intended?

I tried to bisect but I'm not sure the result is useful. I got the following:

  d233b485e83c3a784b803fb894280773f16f2deb is the first bad commit
  commit d233b485e83c3a784b803fb894280773f16f2deb
  Author: Chet Ramey 
  Date:   Mon Jan 7 09:27:52 2019 -0500
  
  bash-5.0 distribution sources and documentation

Thank you to Chet and to everyone for their time working on Bash!

Scott