eshell-prompt-regexp has to be in sync with eshell-prompt-function otherwise certain eshell behavior will not work properly For example: eshell-bol