zsh tab completion bug on ubuntu

与世无争的帅哥 提交于 2019-12-07 00:18:07

问题


I'm getting a really annoying bug here:

% git s<TAB> becomes

% git   sgit  s  
send-email   -- send collection of patches as emails  
send-pack     -- push objects over git protocol to another repository  
...

It just duplicates the command. If I resize the screen, it goes back to normal: git s

How do I fix this?


回答1:


I got it! Darn. It's my prompt

instead of:

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 ${VIMODE} '

And everything works fine now...



来源:https://stackoverflow.com/questions/11146306/zsh-tab-completion-bug-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!