Search code examples
ubuntuzshgnome-terminal

zsh tab completion bug on ubuntu


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?


Solution

  • 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...