Remover / comentar estas linhas:
PROMPT_COMMAND='history -a'
HISTCONTROL="erasedups:ignoreboth"
export HISTIGNORE="&:[ ]*:exit:ls:history:cd:pwd"
Comentar as linhas acima parece ter resolvido o problema. Eu suspeito que o aplicativo ou o shell determina onde você estava anteriormente analisando o mais recente cd
em history
.