Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Rocky Bernstein
Bashdb skip help is now https://sourceforge.net/p/bashdb/code/ci/master/tree/command/skip.sh#l30 If this is incorrect, deficient, or you have improvements, let me know. Thanks. On Sat, Apr 8, 2017 at 7:52 PM, Rocky Bernstein wrote: > Good point! Will make note of that too. > > On Sat, Apr 8, 2

Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Rocky Bernstein
Good point! Will make note of that too. On Sat, Apr 8, 2017 at 7:15 PM, Chet Ramey wrote: > On 4/8/17 6:48 PM, Rocky Bernstein wrote: > > Thanks for giving me a heads up here. I have updated the bashdb > > documentation for the skip command make clear that $? is no changed in > > skipping an ins

Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Chet Ramey
On 4/8/17 6:48 PM, Rocky Bernstein wrote: > Thanks for giving me a heads up here. I have updated the bashdb > documentation for the skip command make clear that $? is no changed in > skipping an instruction. OK. I was more concerned with documenting that using "skip" on the while command test will

Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Rocky Bernstein
Thanks for giving me a heads up here. I have updated the bashdb documentation for the skip command make clear that $? is no changed in skipping an instruction. More generally bash saves and restores some state on entry and exit to extdebug, like the variable $? (the extdebug function can issue a c

Re: while loop with extdebug + debug trap always returning 1

2017-04-07 Thread Chet Ramey
On 4/4/17 5:08 PM, nesro wrote: > > To have both commands similar, let's assume the while as this: > > while (( 1 > 2 )); do :; done > > Thanks for explaining me why it happen, but now I don't know why for cycle > works and while does not. When extdebug is enabled, the command is skipped if the

Re: while loop with extdebug + debug trap always returning 1

2017-04-04 Thread nesro
Hi Martin, thanks for reply. > > # run an empty for cycle. we can see from the output that bash ran :, then > > # false and stopped to it. which is the right behavior > > for (( :; false; )); do :; done > > This is a syntax error. 'for' takes arithmetic expressions, not shell > commands. Sorry, m

Re: while loop with extdebug + debug trap always returning 1

2017-04-04 Thread Martijn Dekker
Op 04-04-17 om 11:41 schreef nesro: > # run an empty for cycle. we can see from the output that bash ran :, then > # false and stopped to it. which is the right behavior > for (( :; false; )); do :; done This is a syntax error. 'for' takes arithmetic expressions, not shell commands. > # now run t