PROMPT_COMMAND is not parsed by eshell, so unset it.
enabled undo-tree