On 1/23/18 1:23 PM, 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 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 think the way to go forward on this is to make PROMPT_COMMAND an array
variable in a future version of bash. This is completely backwards-
compatible with current usage.

In the meantime, appending using $'\n' as a separator is the best way to
add commands to $PROMPT_COMMAND.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to