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: tetsujin
Subject: Re: Feature request: PROMPT_COMMANDS array variable
Date: Tue, 23 Jan 2018 18:09:17 -0500

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 can't export the variable any more, for instance.

----- Original Message -----
From: "Daniel Colascione" <dancol@google.com>
To:<bug-bash@gnu.org>
Cc:
Sent:Tue, 23 Jan 2018 10:23:38 -0800
Subject:Feature request: PROMPT_COMMANDS array variable

 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.



reply via email to

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