readline-6.3: update config.h.in

2015-04-19 Thread Andreas Schwab
The config.h.in file in the standalone readline distribution is missing a lot of templates. It should really be generated by autoheader. --- readline-6.3/config.h.in.~1~2012-01-18 16:22:13.0 +0100 +++ readline-6.3/config.h.in2015-04-19 19:39:13.215290092 +0200 @@ -6,6 +6,14 @@

Re: read() returns positive numbers in BSD systems, which make: bash / valid.

2015-04-19 Thread Chet Ramey
On 4/17/15 2:43 PM, Eduardo A. Bustamante López wrote: > In the BSDs, doing a read on a directory doesn't return a negative value. Thanks for the investigation and report. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrat

Re: associative arrays and [[ -v

2015-04-19 Thread Chet Ramey
On 4/17/15 6:45 PM, isabella parakiss wrote: > This seems the way to go, but I'm not sure I understand why: > > $ declare -A arr=([a]=b) > $ [[ -v arr['$var'] ]]; echo $? > 1 > $ declare -A arr=(['*']=x) > $ [[ -v arr['$var'] ]]; echo $? > 0 > > > What's happening? Well, as I said before, `*'

Re: [Help-bash] make function local

2015-04-19 Thread Chet Ramey
On 4/17/15 6:27 PM, Linda Walsh wrote: > > > Eduardo A. Bustamante López wrote: >> Well, if your scripts are so simple, why use local functions at all? > --- > Cleanliness, Hygiene... Please, let's not have this argument again. I think you're all using the term `local function' to mean diff

Re: readline-6.3: update config.h.in

2015-04-19 Thread Chet Ramey
On 4/19/15 2:00 PM, Andreas Schwab wrote: > The config.h.in file in the standalone readline distribution is missing > a lot of templates. It should really be generated by autoheader. > > --- readline-6.3/config.h.in.~1~ 2012-01-18 16:22:13.0 +0100 > +++ readline-6.3/config.h.in 2015

Re: [PATCH] circular buffer + hash for jobs.c:bgpids

2015-04-19 Thread Chet Ramey
On 4/17/15 4:55 PM, John Fremlin wrote: > Did some benchmarks, for the while true; do (:) & (:); done simple example > this goes from 215 to 313 iterations/s, and changes sys+user CPU from 152% > to 45% > > Any long running bash script will tend to exhibit this issue -- I disagree that `any' long

Re: Multiple patches to fix compiler warnings

2015-04-19 Thread Chet Ramey
On 4/17/15 2:03 PM, Eduardo A. Bustamante López wrote: > 0001-Fix-spacing-issues-in-tests-to-make-it-easier-to-tra.patch > 0002-Fix-unclosed-double-quote.patch > 0004-Fix-declare-regression.patch > 0003-Remove-compiler-warnings.-Does-that-really-need-to-b.patch > 0005-Make-the-compiler-happy-remove

Re: [Help-bash] make function local

2015-04-19 Thread Peng Yu
Hi Chet, >> Eduardo A. Bustamante López wrote: >>> Well, if your scripts are so simple, why use local functions at all? >> --- >> Cleanliness, Hygiene... > > Please, let's not have this argument again. I think you're all using the > term `local function' to mean different things. > > You seem

Re: associative arrays and [[ -v

2015-04-19 Thread isabella parakiss
On 4/20/15, Chet Ramey wrote: > On 4/17/15 6:45 PM, isabella parakiss wrote: > >> This seems the way to go, but I'm not sure I understand why: >> >> $ declare -A arr=([a]=b) >> $ [[ -v arr['$var'] ]]; echo $? >> 1 >> $ declare -A arr=(['*']=x) >> $ [[ -v arr['$var'] ]]; echo $? >> 0 >> >> >> What'