On 4/15/20 2:59 PM, Franklin, Jason wrote: > Bash Version: 5.0 > Patch Level: 16 > Release Status: release > > Description: > > I have discovered that PROMPT_COMMAND is not executed before the > printing of PS1 in the following three situations:
PROMPT_COMMAND is printed before PS1 when the shell goes to read a command. (When you're using readline, readline prints the prompt initially, but PROMPT_COMMAND works whether you're using editing or not.) That isn't true in any of these cases. > > (1) <C-x><C-e> is used > (2) histverify is set > (3) completion suggestions are shown In cases 1 and 3, that all takes place within a single call to readline(), even before the shell receives and tries to parse any of the line. In the case of histverify, it's just about the same thing, technically after the readline() call returns but before the shell parser gets the line -- it's logically the same call. These all pretty much all fall into the category of the editor reprinting the prompt before it returns. -- ``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/