On 11/6/21 9:57 AM, Piotr P. Stefaniak wrote:
Hi,

Using bash 5.0.17 edit-and-execute-command I type in something like
cd /tmp
save and exit to execute. $PWD is properly updated but the prompt
doesn't reflect the change (not until the next time it is printed).

The answer is the same as to this question from back in March:

https://lists.gnu.org/archive/html/bug-bash/2021-03/msg00145.html

`edit-and-execute-command' is a bindable readline command. The prompt
passed to readline persists throughout the entire duration of a single
call to readline(). When you run edit-and-execute-command via a readline
key binding, you're still within the same call to readline(), and readline
takes care of redisplaying the prompt and continuing to read input when
that command completes. There is no point where readline() returns a line
to its caller, so there's no point where the prompt is re-evaluated.

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

Reply via email to