ubuntu上的zsh tab完成错误

BPm*_*BPm 8 ubuntu zsh gnome-terminal

我在这里得到一个非常烦人的错误:

% git s<TAB>

% git   sgit  s  
send-email   -- send collection of patches as emails  
send-pack     -- push objects over git protocol to another repository  
...
Run Code Online (Sandbox Code Playgroud)

它只是重复命令.如果我调整屏幕大小,它会恢复正常:git s

我该如何解决?

BPm*_*BPm 8

我知道了!该死.这是我的提示

代替:

PS1=$'%B%F{$fg[green]%}${PWD/#$HOME/~}%{$reset_color%}git-prompt ${VIMODE} '

I should just do

PS1=$'%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}git-prompt

PS1=$'%B%F{$fg[green]%}${PWD/#$HOME/~}%{$reset_color%}git-prompt

I should just do

PS1=$'%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}git-prompt ${VIMODE} '

现在一切正常......