Re: [Help-bash] make function local

2015-04-10 Thread Dan Douglas
On Thu, Apr 9, 2015 at 5:40 PM, Peng Yu wrote: > However, the real problem is that global variable make larger programs > difficult to maintain. Therefore, the problem becomes severe for > people using bash for making bash libraries. Any ad hoc use of bash > can always get away from this prob

Re: Second trap invocation is ignored?

2015-04-10 Thread Scott Bronson
On Fri, Apr 10, 2015 at 8:16 AM, Chet Ramey wrote: > On 4/6/15 11:58 AM, Greg Wooledge wrote: > > I'd be fine with that, but then why does "source ./foo" create a DEBUG > > trap at the global scope the *first* time? > > Because there's nothing to save and restore. Just curious: why not restore th

Re: [Help-bash] make function local

2015-04-10 Thread Chet Ramey
On 4/10/15 10:13 AM, Eduardo A. Bustamante López wrote: > - a faster implementation of the variable lookup code What does this mean, exactly? Optimizing the existing code paths? (Have at it.) Different semantics? Static as opposed to dynamic scoping? > - a shopt to disable evaluation of shell

Re: Bash wrongly attaches subcommand stdin on syntax error

2015-04-10 Thread Chet Ramey
On 4/7/15 6:56 AM, Sam Liddicott wrote: > Bash Version: 4.3 > Patch Level: 11 > Release Status: release > > Description: > Shell wrongly attaches stdin piped to command sequence with syntax error > > Repeat-By: > On a login shell or interactive shell, paste the following command: > >