segfault

2012-08-22 Thread armandsl
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPAC

Re: segfault

2012-08-22 Thread Chet Ramey
On 8/22/12 7:28 AM, arman...@gmail.com wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu' >

bashref.texi niglets

2012-08-22 Thread Karl Berry
Hi Chet, Perusing bashref.texi ... 1) Technically, version.texi should be before the %**end of header. 2) @setchapternewpage odd creates blank pages. There's no need to inflict them on everyone by default. If the FSF or anyone wants that for printing, they can always use -t @setchapternewpage

BASH_COMMAND is incorrect when working with subshells and error traps

2012-08-22 Thread Mike Frysinger
consider this simple code: $ cat test.sh #!/bin/bash trap 'echo $BASH_COMMAND; exit 1' ERR set -e true (false) true when run, we see: $ ./test.sh true 1 this can be confusing when utilized with automatic backtraces :( even when using errtrace and debugtrace, BASH_COMMAND is incorrect -mike si

Re: BASH_COMMAND is incorrect when working with subshells and error traps

2012-08-22 Thread Mike Frysinger
On Wednesday 22 August 2012 12:30:11 Mike Frysinger wrote: > consider this simple code: > > $ cat test.sh > #!/bin/bash > trap 'echo $BASH_COMMAND; exit 1' ERR > set -e > true > (false) > true > > when run, we see: > $ ./test.sh > true 1 err, i tweaked my shell script slightly so this output wou

Re: BASH_COMMAND is incorrect when working with subshells and error traps

2012-08-22 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/22/12 3:35 PM, Mike Frysinger wrote: > On Wednesday 22 August 2012 12:30:11 Mike Frysinger wrote: >> consider this simple code: >> >> $ cat test.sh >> #!/bin/bash >> trap 'echo $BASH_COMMAND; exit 1' ERR >> set -e >> true >> (false) >> true >> >>

Re: bash does filename expansion when assigning to array member in compound form

2012-08-22 Thread Chet Ramey
On 8/20/12 5:12 PM, Dan Douglas wrote: > On Monday, August 20, 2012 07:44:51 PM Roman Rakus wrote: >> And how would you achieve to fill array with all file names containing >> `[1]=' for example. > > $ ls > [1]=a [1]=b > $ ( typeset -a a=( \[1\]=* ); typeset -p a ) > typeset -a a=('[1]=a' '[1]=b