Re: turning on file+line for functions with shopt -s extdebug gives error

2019-03-01 Thread Chet Ramey
On 2/27/19 4:19 PM, L A Walsh wrote: >>> Are they defined "somewhere"? Maybe a short note as to what they >>> are might be added to the manpage where the terms are used (under >>> description of shopt+extdebug)? >>> >> >> They're described in the FUNCTIONS section, since they affect function

Re: history -a misbehaves with $HISTSIZE

2019-03-01 Thread Chet Ramey
On 2/28/19 5:53 PM, Айрат Васбикарамов wrote: >> It seems like what you want is min(history_lines_this_session, >> history_offset), >> kind of like what you say below. Try the attached patch and see if it >> does what you want. > > Yes, that's what I mean. > >> I don't think this would happen to

Re: Simple exit trap doesn't run in newer versions of bash

2019-03-01 Thread Chet Ramey
> > (trap "echo WORKS" EXIT; touch x) > > (trap "echo WORKS" EXIT && touch x) > > bash -c 'trap "echo WORKS" EXIT; true' > > bash -c 'trap "echo WORKS" EXIT; false' > > bash -c 'trap "echo WORKS" EXIT; touch x && a' > > bash -c 'trap "echo WORKS" EXIT; touch x; a' > > > > They all produce the outp

Re: turning on file+line for functions with shopt -s extdebug gives error

2019-03-01 Thread Robert Elz
Date:Fri, 1 Mar 2019 11:00:41 -0500 From:Chet Ramey Message-ID: <91e964e9-a7e3-4f4e-ae9f-9ff3e3627...@case.edu> | It's wasteful and not particularly useful to have | the function definition text stored internally when you can regenerate an | equivalent form from

Please store source file name + line number for all functions defined whether or not bashdb is running.

2019-03-01 Thread L A Walsh
On 3/1/2019 8:00 AM, Chet Ramey wrote: > On 2/27/19 4:19 PM, L A Walsh wrote: > > > BASH_SOURCE and BASH_LINENO are available even when the debugger is > not running, as is the `caller' builtin. They are available, but have the wrong information. Though for the current line number shoul