On 3/18/21 11:29 AM, earnestly wrote:
When using edit-and-execute-command to edit the command-line I've noticed that PROMPT_COMMAND is not evaluated upon returning to the prompt
It shouldn't be. Bash executes PROMPT_COMMAND before it calls readline to read the first line of a command. edit-and-execute-command is a bindable readline command. All the commands executed as a result of it happen in the context of a single call to readline(), and it is readline that redisplays the prompt when edit-and- execute-command completes. The readline() call doesn't return the line at that point. Since readline prints the prompt as part of redisplay, and it doesn't know anything about PROMPT_COMMAND or command execution, it doesn't execute it. -- ``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/