Re: bash --debugger on a script with no arguments

2015-04-29 Thread Rocky Bernstein
/bash --debugger -i /tmp/foo.sh hi On Wed, Apr 29, 2015 at 9:39 PM, Chet Ramey wrote: > On 4/29/15 9:07 PM, Rocky Bernstein wrote: > > > And to the end of being more informative, In the thread you cited, there > > was a suggestion about being more informative about skipping > debugger_start() :

Re: bash --debugger on a script with no arguments

2015-04-29 Thread Chet Ramey
On 4/29/15 9:07 PM, Rocky Bernstein wrote: > And to the end of being more informative, In the thread you cited, there > was a suggestion about being more informative about skipping debugger_start() > : > >> >/ Maybe something like this:/ >> >/ / >> >/ bash: foo: debugger /usr/local/share/bashdb/

Re: bash --debugger on a script with no arguments

2015-04-29 Thread Rocky Bernstein
Ok. I see my mistake. That long expression is deceptively similar to the other long expression; neither has a comment as to what's going on. As you suggest, I've tested from the git devel branch and yes, this works. Chet writes: > Since dollar_vars[0] is always set, testing it would not have any

Re: bash --debugger on a script with no arguments

2015-04-29 Thread Chet Ramey
On 4/29/15 8:05 PM, Rocky Bernstein wrote: > I am sure you have changed this as you said. But I just don't see it in the > current source on savannah in the devel branch. For example I looked at: > > http://git.savannah.gnu.org/cgit/bash.git/tree/shell.c?h=devel > > Is there a URL like the one a

Re: bash --debugger on a script with no arguments

2015-04-29 Thread Rocky Bernstein
I am sure you have changed this as you said. But I just don't see it in the current source on savannah in the devel branch. For example I looked at: http://git.savannah.gnu.org/cgit/bash.git/tree/shell.c?h=devel Is there a URL like the one above folks can look at and see the change? Thanks. On

Re: bash --debugger on a script with no arguments

2015-04-29 Thread Chet Ramey
On 4/29/15 1:51 PM, Rocky Bernstein wrote: > Now I am really confused and I am not sure we are talking about the same > thing We really are. > In bash-4.3.30 on ftp://ftp.gnu.org/gnu/bash at line 723 of shell.c > there is: > > if (debugging_mode && locally_skip_execution == 0 && running_setui

Re: declare -p doesn't show the global attribute

2015-04-29 Thread Chet Ramey
On 4/27/15 2:26 AM, isabella parakiss wrote: > On 4/27/15, Chet Ramey wrote: >> On 4/26/15 5:26 PM, isabella parakiss wrote: >>> $ fn () { declare -g var=x; declare -p var; } ; fn >>> declare -- var="x" >>> >>> I think the correct output should be declare -g var="x" >>> Is this intended or is it a

Re: bash --debugger on a script with no arguments

2015-04-29 Thread Rocky Bernstein
Now I am really confused and I am not sure we are talking about the same thing. In bash-4.3.30 on ftp://ftp.gnu.org/gnu/bash at line 723 of shell.c there is: if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0 && dollar_vars[1]) start_debugger (); Shouldn't dollar_vars[

Re: bash --debugger on a script with no arguments

2015-04-29 Thread Chet Ramey
On 4/28/15 10:11 PM, Rocky Bernstein wrote: > It's come to my attention that running bash --debugger doesn't source > DEBUGGER_START_FILE when the script to be debugged isn't followed by any > arguments. This was changed last November in the devel branch as part of a set of changes to make the ab