bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: PROMPT_COMMANDS array variable


From: Daniel Colascione
Subject: Re: Feature request: PROMPT_COMMANDS array variable
Date: Tue, 23 Jan 2018 19:14:58 -0800

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, 2018 7:05 PM, "Clark Wang" <address@hidden> wrote:

> On Wed, Jan 24, 2018 at 2:23 AM, Daniel Colascione <address@hidden>
> 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 code at
>> PROMPT_COMMAND time. Can we add a new PROMPT_COMMANDS array variable that
>> stores a list of shell commands to execute? With a PROMPT_COMMANDS
>> variable, different packages can independently add their hooks without
>> stepping on each other.
>>
>
> I would define my own array var and go through it in PROMPT_COMMAND. (My
> PROMPT_COMMAND is just a function name.)
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]