I've been using Emacs's ansi-term
for a while, and it's usually worked, more or less. Recently, though, ansi-term has started interpreting the characters on the right side of my terminal as part of the commands I type. Here is the code for my prompt (using oh-my-zsh):
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}$(get_pwd) %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} %{$reset_color%}'
function get_pwd() {
print -D $PWD
}
return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
RPROMPT='${return_code} %{$fg_bold[cyan]%}$(rvm-prompt)%{$reset_color%}$(git_prompt_status)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
#GIT_PS1_SHOWUPSTREAM=verbose
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
This is what it looks like:
➜ ~/.emacs.d git:(master) ruby-2.1.0 ✖ ✹ ✭
And this is what ansi-term does:
➜ ~/.emacs.d git:(master) ✗ ls 2 ↵ ruby-2.1.0 ✖ ✹ ✭
ls: cannot access 2: No such file or directory
ls: cannot access ↵: No such file or directory
ls: cannot access ruby-2.1.0: No such file or directory
ls: cannot access ✖: No such file or directory
ls: cannot access ✹: No such file or directory
ls: cannot access ✭: No such file or directory
I'm not sure what happened that would have triggered this problem, though I did upgrade all my packages recently. Is there a workaround?