bug-bash
[Top][All Lists]
Advanced

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

Re: How to use PROMPT_COMMAND(S) without breaking other scripts


From: Koichi Murase
Subject: Re: How to use PROMPT_COMMAND(S) without breaking other scripts
Date: Tue, 25 Aug 2020 00:38:22 +0900

2020-08-24 23:57 Chet Ramey <chet.ramey@case.edu>:
> There's no real good solution. I wanted a clean break between the scalar
> and array versions, figuring that the distributions that populated
> PROMPT_COMMAND could easily make that PROMPT_COMMANDS[0].

Thank you for your reply.  OK, if there would be no better solution, I
would go with the first option (to convert PROMPT_COMMAND to
PROMPT_COMMANDS and append mine to PROMPT_COMMANDS) and see if
something happens.

> The problem there is that it interferes with the ability to use
> both, as some distros might want as a transition, and result in
> commands being executed twice.

Now I see the points.  I didn't come to the idea to set the values to
both as I somehow unconsciously assumed that everyone checks the Bash
version when one uses PROMPT_COMMANDS.  Thank you for pointing this
out.  This means that I need to be careful if I would convert
PROMPT_COMMAND set by others into PROMPT_COMMANDS.

--
Koichi



reply via email to

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