Zsh in Emacs unwanted character releases

Regardless of the fact that I use the term or ansi-term to run zsh in Emacs, I encounter this problem, whenever I enter commands, there will be some unwanted characters in the output, for example:

[ruby-1.9.2] ~ pwd 2; pwd1; PWD / Users / tyraeltong

"2; pwd1; pwd" fastens the output; I don’t know if the other problems are the same? I found a similar theme here Getting Emss ansi-term and Zsh to play well , but [[$ TERM == eterm-color]] && & && export TERM = xterm I still see unnecessary characters.

+6
source share
3 answers

Emacs does not play well with ZLE, so I have this in my ~ / .zshrc:

if [[ -n ${INSIDE_EMACS} ]]; then # This shell runs inside an Emacs *shell*/*term* buffer. prompt walters unsetopt zle fi 
+5
source

Found a solution in the above message

In a nutshell, in emacs Mx package-install and install multi-user mode. Mx multi-term launches a shell, with all the calls and whistles oh-my-zsh can offer

+1
source

It could be an unusual PROMPT_COMMAND, which has bash syntax. Try:

 export PROMPT_COMMAND="" 

and see if that helps.

0
source

Source: https://habr.com/ru/post/897730/


All Articles