Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16803

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

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: How to use PROMPT_COMMAND(S) without breaking other scripts
Date 2020-08-24 15:37 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.1056.1598297846.2469.bug-bash@gnu.org> (permalink)
References (1 earlier) <17a0ba52-32ee-b9bc-72ff-3587b2050fbd@case.edu> <CAFLRLk9vNPM5NtypB2UNcDqMZfG3Lmi3zEMGfPqZNacmHCoAoA@mail.gmail.com> <0c10b76f-a7f0-1c52-77b7-4b208035956b@case.edu> <c904f5b5-1312-ac4c-26bd-bfb97c1f43e8@inlv.org> <669a0539-fd4f-b4f9-f4c5-06922fb670d0@case.edu>

Show all headers | View raw


On 8/24/20 12:58 PM, Martijn Dekker wrote:
> Op 24-08-20 om 15:57 schreef Chet Ramey:
>> I sometimes think I should have stuck with converting PROMPT_COMMAND to
>> an array. Either way, there's going to be a transition, and maybe that
>> would have been the easiest.
> 
> Is it too late? I think that would actually be cleaner than adding a
> separate array, per Koichi's report.

We're not "adding" anything. Bash just looks for this variable and reacts
if it finds it. It's not a special variable, and bash doesn't create it if
it doesn't exist.

What I mean is looking for PROMPT_COMMAND as happens now, and reacting a
different way if it's an array variable. That would resolve the existing
assignment issues, but open up the separate issues you describe.

Chet

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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: How to use PROMPT_COMMAND(S) without breaking other scripts Chet Ramey <chet.ramey@case.edu> - 2020-08-24 15:37 -0400

csiph-web