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
On 2/5/18 9:05 AM, Greg Wooledge wrote:
> On Sat, Feb 03, 2018 at 02:57:33PM +0100, Egmont Koblinger wrote:
>> So the use case is: Someone wants to _add_ something to
>> PROMPT_COMMAND. How to do that?
>
> PROMPT_COMMAND+=$'\n''my new stuff'
>
> Or, test whether PROMPT_COMMAND is currently empty,
On Sat, Feb 03, 2018 at 02:57:33PM +0100, Egmont Koblinger wrote:
> So the use case is: Someone wants to _add_ something to
> PROMPT_COMMAND. How to do that?
PROMPT_COMMAND+=$'\n''my new stuff'
Or, test whether PROMPT_COMMAND is currently empty, and only
append the newline (or semicolon) if it's
Hi,
I'd like to second this feature request.
As Daniel mentioned, the biggest problem with the current single
variable approach that it's hardly usable due to lack of coordination
between distributions as well as apps that wish to modify
PROMPT_COMMAND. Let's look at it at more details.
There is
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, 201
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 code at
> PROMPT_COMMA
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