[Top][All Lists]

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

Re: [bug] PROMPT_COMMAND is not executed as expected in some situations

From: Chet Ramey
Subject: Re: [bug] PROMPT_COMMAND is not executed as expected in some situations
Date: Thu, 16 Apr 2020 10:11:41 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/16/20 9:21 AM, Franklin, Jason wrote:
> On 4/15/20 5:35 PM, Chet Ramey wrote:
>> These all pretty much all fall into the category of the editor reprinting
>> the prompt before it returns.
> Hmmm...
> So, is there no way to have Bash handle the printing of the prompt after
> the return of the command and of the editor?

Bash doesn't have control at that point. It's readline running a bindable
function. It's as if you hit ^L when the readline line buffer was empty:
readline reprints the prompt, but should it call back to bash somehow --
through a hook function that doesn't currently exist -- to execute

> This would allow PROMPT_COMMAND to function as expected.  It is
> surprising to see status indicators in my prompt NOT be updated when
> using <C-x><C-e>.

I don't think that most people expect PROMPT_COMMAND in that situation.
> I thought that this would be easy.  Is it really not possible to fix?

I'm saying it's not a bug at all, and doesn't need fixing.

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

reply via email to

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