Re: Bash removes unrequested characters in bracket expressions (not a range).

2018-12-03 Thread Bize Ma
Chet Ramey () wrote: > On 11/24/18 4:32 PM, Bize Ma wrote: [...] > > I have been made aware that there is a > > cstart = cend = FOLD (cstart); > > inside the `sm_loop.c` file that will convert into a range many > > individual character. If that understanding is correct that is the > >

Re: Incorrect path canonicalisation at autocompletion

2018-12-03 Thread Chet Ramey
On 12/1/18 3:12 PM, Mattias Andrée wrote: > Using Bash 4.4.023, type > > cd > mkdir -p 1/2 > cd 1/2 > touch ../../3 > ln -s ~ 4 > touch 5 > ls 4/../ > > without pressing enter at the last line, > instead press twice. 4/ and 5 will > be suggested, but if

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-03 Thread Chet Ramey
On 12/2/18 6:13 PM, Ole Tange wrote: > On Wed, Nov 21, 2018 at 11:45 PM Chet Ramey wrote: >> On 11/21/18 3:07 PM, Ole Tange wrote: >>> 'brand' in variables.c is comparable in size to ChaCha20 and ChaCha20 >>> is not completely broken: >>> https://en.wikipedia.org/wiki/Salsa20 >>> >>> Could we

Re: Incorrect path canonicalisation at autocompletion

2018-12-03 Thread Mattias Andrée
On Mon, 3 Dec 2018 09:58:33 -0500 Chet Ramey wrote: > On 12/3/18 9:49 AM, Mattias Andrée wrote: > > On Mon, 3 Dec 2018 09:33:48 -0500 > > Chet Ramey wrote: > > > >> On 12/1/18 3:12 PM, Mattias Andrée wrote: > >>> Using Bash 4.4.023, type > >>> > >>> cd > >>> mkdir -p 1/2 > >>> cd 1/2

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-03 Thread Greg Wooledge
On Mon, Dec 03, 2018 at 09:56:33AM -0500, Chet Ramey wrote: > There has to be a compelling reason to change this, especially at a point > so close to a major release. > > You might be expecting too much from bash's random number generator. Is > the problem that its period is at most 2**16? For

Re: remove empty '' in ${var@Q} result?

2018-12-03 Thread Chet Ramey
On 11/28/18 9:58 PM, Clark Wang wrote: > On Wed, Nov 8, 2017 at 9:46 PM Chet Ramey > wrote: > > On 11/7/17 11:38 PM, Clark Wang wrote: > > >         I made a patch (also attached). Please see if it's ok. > > > > > >     Updated by dealing with

Re: Bash removes unrequested characters in bracket expressions (not a range).

2018-12-03 Thread Chet Ramey
On 11/24/18 2:32 PM, Chet Ramey wrote: >> But IMO locale collation should not be used for an explicit list. > > Collation order is used for each individual character in a bracket > expression when compared against the string, as posix specifies. > >> I have been made aware that there is a >>    

Re: Bash removes unrequested characters in bracket expressions (not a range).

2018-12-03 Thread Bize Ma
Chet Ramey () wrote: > On 11/24/18 2:32 PM, Chet Ramey wrote: > > >> But IMO locale collation should not be used for an explicit list. > > > > Collation order is used for each individual character in a bracket > > expression when compared against the string, as posix specifies. > Yes, values

Re: Bash removes unrequested characters in bracket expressions (not a range).

2018-12-03 Thread Chet Ramey
On 11/28/18 2:29 AM, Bize Ma wrote: > Chet Ramey (mailto:chet.ra...@case.edu>>) wrote: > > On 11/24/18 4:32 PM, Bize Ma wrote: > >  [...] > > > I have been made aware that there is a > >   cstart = cend = FOLD (cstart); > > inside the `sm_loop.c` file that will convert into

Re: Bash removes unrequested characters in bracket expressions (not a range).

2018-12-03 Thread Chet Ramey
On 11/24/18 4:32 PM, Bize Ma wrote: > > Bash is removing characters not explicitly listed in a bracket > > expression (character range). > > In this example, it is removing digits from other languages. > > What is your locale? > >   > The locale used was en_US.utf-8 but also

Re: Bash removes unrequested characters in bracket expressions (not a range).

2018-12-03 Thread Chet Ramey
On 11/28/18 2:45 AM, Bize Ma wrote: > Chet Ramey (mailto:chet.ra...@case.edu>>) wrote: > > On 11/24/18 2:32 PM, Chet Ramey wrote: > > >> But IMO locale collation should not be used for an explicit list. > > > > Collation order is used for each individual character in a bracket >

Re: Bash removes unrequested characters in bracket expressions (not a range).

2018-12-03 Thread Chet Ramey
On 11/28/18 2:05 AM, Bize Ma wrote: > Chet Ramey (mailto:chet.ra...@case.edu>>) wrote: >   > > I can't reproduce this: > > > If you could take a look at https://unix.stackexchange.com/a/483835/265604 > you will see that it has been confirmed on "Ubuntu 17.10 (glibc 2.26) and on > Ubuntu

Re: Incorrect path canonicalisation at autocompletion

2018-12-03 Thread Mattias Andrée
On Mon, 3 Dec 2018 09:33:48 -0500 Chet Ramey wrote: > On 12/1/18 3:12 PM, Mattias Andrée wrote: > > Using Bash 4.4.023, type > > > > cd > > mkdir -p 1/2 > > cd 1/2 > > touch ../../3 > > ln -s ~ 4 > > touch 5 > > ls 4/../ > > > > without pressing enter at the last

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-03 Thread Ole Tange
On Mon, Dec 3, 2018 at 3:56 PM Chet Ramey wrote: > There has to be a compelling reason to change this, especially at a point > so close to a major release. The reason for my submission was that I needed a bunch of random numbers in a shell script, but I needed them to be high quality. Luckily I

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-03 Thread Greg Wooledge
On Mon, Dec 03, 2018 at 05:31:18PM +0100, Ole Tange wrote: > Luckily I did not just assume that Bash delivers high quality random > numbers, but I read the source code, and then found that the quality > was low. I do not think must users would do that. You're correct. Most users would not have

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-03 Thread Eduardo Bustamante
On Mon, Dec 3, 2018 at 9:36 AM Greg Wooledge wrote: > > On Mon, Dec 03, 2018 at 05:31:18PM +0100, Ole Tange wrote: > > Luckily I did not just assume that Bash delivers high quality random > > numbers, but I read the source code, and then found that the quality > > was low. I do not think must

Re: Bash removes unrequested characters in bracket expressions (not a range).

2018-12-03 Thread Bize Ma
Chet Ramey () wrote: > I can't reproduce this: > If you could take a look at https://unix.stackexchange.com/a/483835/265604 you will see that it has been confirmed on "Ubuntu 17.10 (glibc 2.26) and on Ubuntu 18.04 (glibc 2.27), but it seems to be fixed on Ubuntu 18.10 (glibc 2.28)" It is

Re: Incorrect path canonicalisation at autocompletion

2018-12-03 Thread Chet Ramey
On 12/3/18 9:49 AM, Mattias Andrée wrote: > On Mon, 3 Dec 2018 09:33:48 -0500 > Chet Ramey wrote: > >> On 12/1/18 3:12 PM, Mattias Andrée wrote: >>> Using Bash 4.4.023, type >>> >>> cd >>> mkdir -p 1/2 >>> cd 1/2 >>> touch ../../3 >>> ln -s ~ 4 >>> touch 5 >>> ls

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-03 Thread Chet Ramey
On 12/3/18 11:31 AM, Ole Tange wrote: > On Mon, Dec 3, 2018 at 3:56 PM Chet Ramey wrote: > >> There has to be a compelling reason to change this, especially at a point >> so close to a major release. > > The reason for my submission was that I needed a bunch of random > numbers in a shell