Re: How to use PROMPT_COMMAND(S) without breaking other scripts
From:
Chet Ramey
Subject:
Re: How to use PROMPT_COMMAND(S) without breaking other scripts
Date:
Mon, 24 Aug 2020 15:58:36 -0400
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.11.0
On 8/24/20 3:53 PM, Martijn Dekker wrote:
>> 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.
>
>
> But I also suggested a way of avoiding those issues: initialise
> $PROMPT_COMMAND a.k.a. ${PROMPT_COMMAND[0]} as empty.
Sure. The burden to do that is on the user. As long as startup scripts do
that -- which they don't do now -- there's no problem.
--
``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/