Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)

2016-02-15 Thread Linda Walsh
Dan Douglas wrote: Ah so `arr+=([a]=x [b]=y)` will no longer be the same as `arr+=([a]+=x [b]+=y)`? I never liked that for associative arrays because the only workaround was to do multiple arr[key]= assignments to update or add more than one element at a time. My thinking was that this is due

Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)

2016-02-15 Thread Dan Douglas
Ah so `arr+=([a]=x [b]=y)` will no longer be the same as `arr+=([a]+=x [b]+=y)`? I never liked that for associative arrays because the only workaround was to do multiple arr[key]= assignments to update or add more than one element at a time. My thinking was that this is due to bash's unique

Q: what is a fast way to see if an 'item' is present in an array?

2016-02-15 Thread Linda Walsh
I has a little 4 line func that returns true or false if a string was in an array I came up with a different way of doing it, that I though might be faster... but... putting them in a file and running loops on them. (times below). Obviously, my feeling for what might be faster was way wrong.

Re: [Nano-devel] How to lock a terminal

2016-02-15 Thread alpha
On Mon, 15 Feb 2016 17:24:06 + Nick Warne wrote: > I ma not sure if this is a bug, or if it is what causes it - if it > isn't, then it is me being stupid. > > I was in a SSH session, and checking something inadvertently issued: > > > nano /var/log/messages | grep a > >

Re: inconsistent function of "-v" use w/arrays and hashes

2016-02-15 Thread Linda Walsh
Linda Walsh wrote: I seem to remember some discussion of this before -- not being able to use -v to check if a hash was defined, but having it "work"(?) w/arrays? So instead of "-v" on an array/hash name only looking at the value of [0] (for either), can it be enhanced to check the type

AW: List out

2016-02-15 Thread Alexander.Elgert
> -Ursprüngliche Nachricht- > Von: bug-bash-bounces+alexander.elgert=external.t-systems@gnu.org > [mailto:bug-bash-bounces+alexander.elgert=external.t- > systems@gnu.org] Im Auftrag von Allodoxaphobia > Gesendet: Montag, 15. Februar 2016 19:13 > An:

Re: How to lock a terminal

2016-02-15 Thread John McKown
Try a Ctrl-X That worked for me with the exact same command line as yours. It exits nano. On Mon, Feb 15, 2016 at 11:24 AM, Nick Warne wrote: > Hi Everybody, > > I ma not sure if this is a bug, or if it is what causes it - if it isn't, > then it is me being stupid. > > I was

Re: redraw-current-line fails with multiline prompts

2016-02-15 Thread Hugh Davenport
February 16 2016 10:22 AM, "Chet Ramey" wrote: > On 2/15/16 3:57 PM, Hugh Davenport wrote: > >> February 16 2016 9:11 AM, "Chet Ramey" wrote: >>> On 2/12/16 12:45 AM, Hugh Davenport wrote: >>> Bash Version: 4.3 Patch Level: 30 Release

How to lock a terminal

2016-02-15 Thread Nick Warne
Hi Everybody, I ma not sure if this is a bug, or if it is what causes it - if it isn't, then it is me being stupid. I was in a SSH session, and checking something inadvertently issued: > nano /var/log/messages | grep a (I was searching for something else than an 'a', but the above example

Re: redraw-current-line fails with multiline prompts

2016-02-15 Thread Chet Ramey
On 2/15/16 3:57 PM, Hugh Davenport wrote: > February 16 2016 9:11 AM, "Chet Ramey" wrote: >> On 2/12/16 12:45 AM, Hugh Davenport wrote: >> >>> Bash Version: 4.3 >>> Patch Level: 30 >>> Release Status: release >>> >>> Description: >>> Assume I have a multiline prompt

Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)

2016-02-15 Thread Chet Ramey
On 2/15/16 3:48 PM, Linda Walsh wrote: > > > Chet Ramey wrote: >> On 2/15/16 12:35 PM, Linda Walsh wrote: >> >> >>> Bash Version: 4.3 >>> Patch Level: 42 >>> Release Status: release >>> >>> Description: >>> [Detailed description of the problem, suggestion, or complaint.] >>> >>> When I

Re: redraw-current-line fails with multiline prompts

2016-02-15 Thread Hugh Davenport
February 16 2016 9:11 AM, "Chet Ramey" wrote: > On 2/12/16 12:45 AM, Hugh Davenport wrote: > >> Bash Version: 4.3 >> Patch Level: 30 >> Release Status: release >> >> Description: >> Assume I have a multiline prompt (`PS1="first\nsecond"`), and a bind to >>

Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)

2016-02-15 Thread Linda Walsh
Chet Ramey wrote: On 2/15/16 12:35 PM, Linda Walsh wrote: Bash Version: 4.3 Patch Level: 42 Release Status: release Description: [Detailed description of the problem, suggestion, or complaint.] When I create hash and later add keys using the form "HASH+=([key]=VALUE)",

Re: Add a mirror to github

2016-02-15 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/15/16 9:49 AM, Eric Blake wrote: > In other words, if you DO add a github mirror, discussion of patches > will still need to take place on this list, and not move to github. The authoritative place for discussions about bash will remain this

Re: Add a mirror to github

2016-02-15 Thread Chet Ramey
On 2/14/16 1:41 AM, konsolebox wrote: > Hi Chet, > > Please consider adding a mirror of bash's git repo in github.com. It > would be easier for many people in the community to contribute code > and discuss it there. There's nothing stopping people from doing that now, and I'd rather discussions

Re: redraw-current-line fails with multiline prompts

2016-02-15 Thread Chet Ramey
On 2/12/16 12:45 AM, Hugh Davenport wrote: > Bash Version: 4.3 > Patch Level: 30 > Release Status: release > > Description: > Assume I have a multiline prompt (`PS1="first\nsecond"`), and a bind to > redraw-current-line (`bind '"\er": redraw-current-line'`). When I > refresh

Re: 'bashbug behavior and doc problem(s)...

2016-02-15 Thread Linda Walsh
Greg Wooledge wrote: On Mon, Feb 15, 2016 at 10:31:24AM -0800, LA Walsh wrote: Ended up looking at manpage, where it says under "ENVIRONMENT": EDITOR Specifies the preferred editor. If EDITOR is not set, bashbug defaults to emacs. This is not correct (probably it used to

Re: Add a mirror to github

2016-02-15 Thread Charles Daffern
On 15/02/16 17:53, strom...@gmail.com wrote: > On Monday, February 15, 2016 at 6:19:56 AM UTC-8, Chet Ramey wrote: >> How does setting up a different place for people to get the code >> contribute to a software monoculture? > github is becoming too popular for free software's own good. > > It's

Re: 'bashbug behavior and doc problem(s)...

2016-02-15 Thread Greg Wooledge
On Mon, Feb 15, 2016 at 10:31:24AM -0800, LA Walsh wrote: > Ended up looking at manpage, where it says under "ENVIRONMENT": > > EDITOR Specifies the preferred editor. If EDITOR is not set, bashbug > defaults to emacs. This is not correct (probably it used to be). bashbug defaults to

Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)

2016-02-15 Thread Chet Ramey
On 2/15/16 12:35 PM, Linda Walsh wrote: > Bash Version: 4.2 > Patch Level: 53 > Release Status: release > > Description: > [Detailed description of the problem, suggestion, or complaint.] > > When I create hash and later add keys using the form > "HASH+=([key]=VALUE)", if KEY

'bashbug behavior and doc problem(s)...

2016-02-15 Thread LA Walsh
Configuration Information [Automatically generated, do not change]: (NOTE: The automatically generated information is incorrect. Just noticed it came from the suse build which is has joined the dumb-down movement -- part of which is moving random binaries & libs from the root partition (/bin

Re: Add a mirror to github

2016-02-15 Thread John McKown
What's wrong with just using git://git.savannah.gnu.org/bash.git ​ ? Why github.com? Granted, it's popular. Of course, you could simply make your own fork of the savannah repository on Github yourself. Why expect Chet to do it? You could do something like: git clone

Re: List out

2016-02-15 Thread Allodoxaphobia
On Mon, 15 Feb 2016 08:19:37 -0500, Greg Wooledge wrote: > On Sun, Feb 14, 2016 at 03:02:58AM +, Allodoxaphobia wrote: >> err... u... What's your *bash bug* ??? > > I think what he meant to say is, "Questions of this type should be > sent to help-b...@gnu.org instead of bug-bash@gnu.org."

Re: Add a mirror to github

2016-02-15 Thread strombrg
On Monday, February 15, 2016 at 6:19:56 AM UTC-8, Chet Ramey wrote: > On 2/14/16 12:53 PM, strom...@gmail.com wrote: > > On Saturday, February 13, 2016 at 10:42:37 PM UTC-8, konsolebox wrote: > >> Hi Chet, > >> > >> Please consider adding a mirror of bash's git repo in github.com. It > >> would

bug adding K,V pairs to existing hash with HASH+=([K]=V)

2016-02-15 Thread Linda Walsh
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.2 -L/home/abuild/rpmbuild/BUILD/bash-4.2/../readline-6.2 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu'

Re: Comma expression in arithmetic evaluation referring to arrays make bash crash.

2016-02-15 Thread Stephane Chazelas
[...] > Reproduced with 4.2.53 on Debian: [...] Actually, it was already reported in early 2013 and fixed for 4.3: http://thread.gmane.org/gmane.comp.shells.bash.bugs/19384 -- Stephane

Re: Comma expression in arithmetic evaluation referring to arrays make bash crash.

2016-02-15 Thread Stephane Chazelas
2016-02-15 09:31:57 -0500, Chet Ramey: > On 2/15/16 8:57 AM, Pontus Stenström wrote: > > > Bash Version: 4.2 > > Patch Level: 24 > > Release Status: release > > > > Description: > > Comma expression in arithmetic evaluation referring to arrays make bash > > crash. > > > > Repeat-By: > >

Re: Comma expression in arithmetic evaluation referring to arrays make bash crash.

2016-02-15 Thread Pontus Stenström
Thanks, it also works fine in GNU bash, version 4.3.42(4)-release (i686-pc-cygwin) Sorry for troubbling you, I will upgrade my bash. Regards -- Pontus From: Greg Wooledge To: Chet Ramey Cc: Pontus Stenström ,

Re: Add a mirror to github

2016-02-15 Thread Eric Blake
On 02/13/2016 11:41 PM, konsolebox wrote: > Hi Chet, > > Please consider adding a mirror of bash's git repo in github.com. It > would be easier for many people in the community to contribute code > and discuss it there. Add your own mirror. Nothing is stopping you from doing it. But the

Re: Comma expression in arithmetic evaluation referring to arrays make bash crash.

2016-02-15 Thread Greg Wooledge
On Mon, Feb 15, 2016 at 09:31:57AM -0500, Chet Ramey wrote: > On 2/15/16 8:57 AM, Pontus Stenström wrote: > > > Bash Version: 4.2 > > Patch Level: 24 > > Release Status: release > > > > Description: > > Comma expression in arithmetic evaluation referring to arrays make bash > > crash. > > >

Re: Comma expression in arithmetic evaluation referring to arrays make bash crash.

2016-02-15 Thread Chet Ramey
On 2/15/16 8:57 AM, Pontus Stenström wrote: > Bash Version: 4.2 > Patch Level: 24 > Release Status: release > > Description: > Comma expression in arithmetic evaluation referring to arrays make bash > crash. > > Repeat-By: > This works fine: > ((c=3, d=4)) > This crashes my

Re: Add a mirror to github

2016-02-15 Thread Chet Ramey
On 2/14/16 12:53 PM, strom...@gmail.com wrote: > On Saturday, February 13, 2016 at 10:42:37 PM UTC-8, konsolebox wrote: >> Hi Chet, >> >> Please consider adding a mirror of bash's git repo in github.com. It >> would be easier for many people in the community to contribute code >> and discuss it

Comma expression in arithmetic evaluation referring to arrays make bash crash.

2016-02-15 Thread Pontus Stenström
Configuration Information [Automatically generated, do not change]:Machine: x86_64OS: linux-gnuCompiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.2 -L/home/abuild/rpmbuild/BUILD/bash-4.2/../readline-6.2Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu'

Re: List out

2016-02-15 Thread Greg Wooledge
On Sun, Feb 14, 2016 at 03:02:58AM +, Allodoxaphobia wrote: > err... u... What's your *bash bug* ??? I think what he meant to say is, "Questions of this type should be sent to help-b...@gnu.org instead of bug-bash@gnu.org." Now... you've been given a Python solution, and I could write