When running a command in the *terminal* in emacs, I always have the command I executed repeated twice with some extra text before the output of the command.

For instance:

$ echo "test"
$ cd ~/a_path

Any idea why this might be happening? I'm using yadr for my zsh configuration (I'm trying out emacs from vim) and spacemacs for emacs.

1 Answer 1


This appears to be your zsh config attempting to set the terminal title. It's common for shells to set the terminal title to the currently running command so you can identify when the command has completed. Emacs does not recognize the escape sequences used to set the terminal title (indeed, they are not standard and vary from terminal to terminal).

When I rolled my own zsh title engine, I ran into this. You can binary search your zsh config, and wrap the title bits in this:

if [[ -z ${EMACS+1} ]]; then
  # title stuff here

Or, of course, you can remove them completely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.