Give up and use PROMPT_COMMAND.