merge the two PROMPT_COMMAND routines