Re: Feature request: PROMPT_COMMANDS array variable

2018-01-23 Thread Daniel Colascione
Sure, but you have a coordination problem. Everyone is going to use a different array name, and since scripts have no way of knowing in advance to what array they need to add their function, we end up the same spot. Putting the array in the core would solve the coordination problem. On Jan 23,

Re: Feature request: PROMPT_COMMANDS array variable

2018-01-23 Thread Clark Wang
On Wed, Jan 24, 2018 at 2:23 AM, Daniel Colascione wrote: > Right now, PROMPT_COMMAND gives a shell command to run before displaying > the prompt. It's common these days to include in one's bash configuration > numerous packages from different sources that *all* want to run

Re: Feature request: PROMPT_COMMANDS array variable

2018-01-23 Thread tetsujin
Well, PROMPT_COMMAND does take shell syntax, so if this is just a question of getting multiple commands in there, you can separate them with semicolons. That said, I do think using an array would be nicer (mainly, it's easier to manipulate the list of commands programmatically) but then you

Feature request: PROMPT_COMMANDS array variable

2018-01-23 Thread Daniel Colascione
Right now, PROMPT_COMMAND gives a shell command to run before displaying the prompt. It's common these days to include in one's bash configuration numerous packages from different sources that *all* want to run code at PROMPT_COMMAND time. Can we add a new PROMPT_COMMANDS array variable that

Re: coredump from C-c-ed function

2018-01-23 Thread xftroxgpx
Original Message On January 23, 2018 5:33 PM, Chet Ramey wrote: >On 1/23/18 9:57 AM, Chet Ramey wrote: >>On 1/23/18 8:54 AM, Chet Ramey wrote: >>>On 1/23/18 3:30 AM, xftroxgpx wrote: Bash Version: 4.4 Patch Level: 12 Release Status: release

Re: coredump from C-c-ed function

2018-01-23 Thread Chet Ramey
On 1/23/18 9:57 AM, Chet Ramey wrote: > On 1/23/18 8:54 AM, Chet Ramey wrote: >> On 1/23/18 3:30 AM, xftroxgpx wrote: >> >>> Bash Version: 4.4 >>> Patch Level: 12 >>> Release Status: release >>> >>> Description: >>> bash coredumps by interrupting a called a function via C-c > > OK, I got it to

Re: coredump from C-c-ed function

2018-01-23 Thread xftroxgpx
​ Original Message On January 23, 2018 2:54 PM, Chet Ramey wrote: >On 1/23/18 3:30 AM, xftroxgpx wrote: > >>Bash Version: 4.4 >> Patch Level: 12 >> Release Status: release >>Description: >> bash coredumps by interrupting a called a function via C-c

Re: coredump from C-c-ed function

2018-01-23 Thread Chet Ramey
On 1/23/18 8:54 AM, Chet Ramey wrote: > On 1/23/18 3:30 AM, xftroxgpx wrote: > >> Bash Version: 4.4 >> Patch Level: 12 >> Release Status: release >> >> Description: >> bash coredumps by interrupting a called a function via C-c OK, I got it to crash. It has something to do with the command

Re: coredump from C-c-ed function

2018-01-23 Thread Chet Ramey
On 1/23/18 3:30 AM, xftroxgpx wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: > bash coredumps by interrupting a called a function via C-c > > Repeat-By: > 1. get interactive bash shell > 2. paste this function definition at command prompt > function

coredump from C-c-ed function

2018-01-23 Thread xftroxgpx
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'