arguments to script prefixed with "--" in debug

2009-02-26 Thread lehe
Hi, I am trying to debug my shell script by bashdb. My script take as argument "--gdb", so I wrote bashdb myscript.sh --gdb However, this way it will produce error that bashdb: unrecognized option '--gdb' If I quote --gdb as bashdb myscript.sh '--gdb' then I will end up with the quote

[PATCH] readline support for FreeBSD-7 and Gentoo/FreeBSD

2009-02-26 Thread Timothy Redaelli
Hi, FreeBSD 7+ does not have /usr/bin/objformat anymore. The problem is that support/shobj-conf and shlib-install uses it to determine if FreeBSD supports ELF or NOT. Given that FreeBSD 7+ ALWAYS has ELF libraries, that check is useless and dangerous (we have no SONAME in library). I attach a p

Re: bashdb question

2009-02-26 Thread Mike Frysinger
On Thursday 26 February 2009 17:36:12 lehe wrote: > I installed bashdb through Synaptic Package Manager of my Ubuntu 8.10 and > it was installed into /usr/share/bashdb/, /usr/bin/, /usr/lib/ etc. Not > sure these could be found by bash. > > How to know if DEBUGGER_START_FILE is defined in pathnames

Re: bash-4.0 regression with here documents and multiline subshells

2009-02-26 Thread Mike Frysinger
On Thursday 26 February 2009 17:29:18 Chet Ramey wrote: > Mike Frysinger wrote: > > the documentation shows that for <<< here documents, the word must be > > right after the operator (although it doesnt really spell it out). not > > sure if that should be made explicit and to have bash reject it,

Re: bashdb question

2009-02-26 Thread Chet Ramey
lehe wrote: > Thanks, Chet! > > I installed bashdb through Synaptic Package Manager of my Ubuntu 8.10 and it > was installed into /usr/share/bashdb/, /usr/bin/, /usr/lib/ etc. Not sure > these could be found by bash. > > How to know if DEBUGGER_START_FILE is defined in pathnames.h and define it

Re: bashdb question

2009-02-26 Thread lehe
Thanks, Chet! I installed bashdb through Synaptic Package Manager of my Ubuntu 8.10 and it was installed into /usr/share/bashdb/, /usr/bin/, /usr/lib/ etc. Not sure these could be found by bash. How to know if DEBUGGER_START_FILE is defined in pathnames.h and define it this way if not? Also I

Re: bash-4.0 regression with here documents and multiline subshells

2009-02-26 Thread Chet Ramey
Mike Frysinger wrote: > the documentation shows that for <<< here documents, the word must be right > after the operator (although it doesnt really spell it out). not sure if > that > should be made explicit and to have bash reject it, or to fix up this issue > so > it works again ... > > at

Re: Associative array indexes not working as expected in Bash 4.0

2009-02-26 Thread Chet Ramey
AnMaster wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' > -DCONF_VENDOR='unknown' >

Re: bashdb question

2009-02-26 Thread Chet Ramey
lehe wrote: > Hi, > I am beginning to use bashdb to debug my shell script. There is one problems > here. With "bash --debugger ./myscript.sh" it will run to finish without > stop, while with "bashdb ./myscript.sh" would stop at the beginning. How > could I stop in the first usage? Thanks a lot! Do

restart debug in Bashdb with Emacs

2009-02-26 Thread lehe
Hi, I am using Bashdb in Emacs. Everytime when I reach "Debugger finished" at the end of the debugging, do I have to restart all over again from typing "M-x bashdb" if I'd like to debug again? Is it possible to save the typing? Thanks! -- View this message in context: http://www.nabble.com/resta

bashdb question

2009-02-26 Thread lehe
Hi, I am beginning to use bashdb to debug my shell script. There is one problems here. With "bash --debugger ./myscript.sh" it will run to finish without stop, while with "bashdb ./myscript.sh" would stop at the beginning. How could I stop in the first usage? Thanks a lot! -- View this message i

Re: bash stuck in a loop defining arrays

2009-02-26 Thread Chet Ramey
Pierre Gaston wrote: > sorry if this mail arrives twice, but the first mail didn't seem to > made it through. > > Configuration Information [Automatically generated, do not change]: > Machine: i386 > OS: openbsd4.4 > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' > -D

[PATCH] readline support for FreeBSD-7 and Gentoo/FreeBSD

2009-02-26 Thread Timothy Redaelli
Hi, FreeBSD 7+ does not have /usr/bin/objformat anymore. The problem is that support/shobj-conf and shlib-install uses it to determine if FreeBSD supports ELF or NOT. Given that FreeBSD 7+ ALWAYS has ELF libraries, that check is useless and dangerous (we have no SONAME in library). I attach a p

bash-4.0 regression with here documents and multiline subshells

2009-02-26 Thread Mike Frysinger
the documentation shows that for <<< here documents, the word must be right after the operator (although it doesnt really spell it out). not sure if that should be made explicit and to have bash reject it, or to fix up this issue so it works again ... at any rate, this style usage, while seemi

Re: Problem with function cd in bash 4.0

2009-02-26 Thread Richard Leeden
Chet Ramey wrote: > > Interesting. This happens only on Linux. FreeBSD, MacOS X, and Solaris > all interrupt and return to $PS1. > > Chet > Actually, this was happening for me on Solaris too, so looks like not just a Linux thing. But your patch fixed the issue on Solaris as well. Richard

Re: large exit values (>255)

2009-02-26 Thread Mike Frysinger
On Thursday 26 February 2009 03:25:50 Sven Mascheck wrote: > On Wed, Feb 25, 2009 at 01:20:50PM -0500, Mike Frysinger wrote: > > seems there's a way to get bash to report exit values greater than 255 > > ... > > you will find the special error values > in shell.h, for instance > #define EX_SHER

Re: large exit values (>255)

2009-02-26 Thread Sven Mascheck
On Wed, Feb 25, 2009 at 01:20:50PM -0500, Mike Frysinger wrote: > seems there's a way to get bash to report exit values greater than 255 ... you will find the special error values in shell.h, for instance #define EX_SHERRBASE256 /* all special error values are > this. */ #define E