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

2015-04-20 Thread Andreas Schwab
Chet Ramey writes: > 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 >> +++ rea

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

2015-04-20 Thread Chet Ramey
On 4/20/15 2:59 AM, Andreas Schwab wrote: >>> +#undef __EXTENSIONS__ >>> +#undef _ALL_SOURCE >>> +#undef _GNU_SOURCE >>> +#undef _POSIX_SOURCE >>> +#undef _POSIX_1_SOURCE >>> +#undef _POSIX_PTHREAD_SEMANTICS >>> +#undef _TANDEM_SOURCE >>> + >> >> Readline configure.ac doesn't call AC_USE_SYSTEM_EX

Re: [Help-bash] make function local

2015-04-20 Thread Chet Ramey
On 4/19/15 10:38 PM, Peng Yu wrote: >> That's the difference: if you're careful with naming and rigorous about >> your calling conventions, your one-time-use functions are about as close >> as you can get to local functions in bash, but you have to pay attention >> to the declaration's side effect

Re: [Help-bash] make function local

2015-04-20 Thread Peng Yu
Hi Chet, >>> That's the difference: if you're careful with naming and rigorous about >>> your calling conventions, your one-time-use functions are about as close >>> as you can get to local functions in bash, but you have to pay attention >>> to the declaration's side effects. >> >> There is at le

Re: [Help-bash] make function local

2015-04-20 Thread Greg Wooledge
On Mon, Apr 20, 2015 at 03:04:00PM -0500, Peng Yu wrote: > Hi Chet, > > I disagree that performance overhead in typical use is `significant'. > > This point is more or less identical to the one I discussed Friday in > > regards to creating huge numbers of variables. Who creates 100,000 > > shell f

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

2015-04-20 Thread John Fremlin
On 4/19/15, 5:24 PM, "Chet Ramey" wrote: >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

Possibly a bug

2015-04-20 Thread Valentin Bajrami
Hi everyone, While testing an awk script and piping the script to a command the following seem to occur. Not sure if this is even a bash problem. Here are some details about my configuration: $ echo "$BASH_VERSION" 4.3.33(1)-release The file called 'history' contains the following code $ cat hi

Re: [Help-bash] make function local

2015-04-20 Thread Chet Ramey
On 4/20/15 4:04 PM, Peng Yu wrote: >> I disagree that performance overhead in typical use is `significant'. >> This point is more or less identical to the one I discussed Friday in >> regards to creating huge numbers of variables. Who creates 100,000 >> shell functions in a single script? The ov

Re: Possibly a bug

2015-04-20 Thread Chet Ramey
On 4/20/15 5:01 PM, Valentin Bajrami wrote: > Now when running ./history | his where his is not an existing command it > fails and adds an entry in the job list. > > $ ./history | his > > [2]+ Stopped ./history | his > bash: his: command not found... > > > Running twice the o

Re: Possibly a bug

2015-04-20 Thread Valentin Bajrami
Hi Chet, I see. But how would I avoid this? Using Fedora 21 here and my command_not_found_handle() is command_not_found_handle () { local runcnf=1; local retval=127; [[ $- =~ i ]] || runcnf=0; [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0; [ ! -x /usr/libexec/packageki

Re: Possibly a bug

2015-04-20 Thread Chet Ramey
On 4/20/15 5:24 PM, Valentin Bajrami wrote: > Hi Chet, > > I see. But how would I avoid this? Using Fedora 21 here and my > command_not_found_handle() is It's hard to say without knowing what pk-command-not-found does. What does this do when you just run `his' from the command line and let it e