Strange zsh autocomplete behaviour
Every time I use tab autocompletion with zsh instead of completing the current string, it gives me a new string + options to complete. It's hard to explane, so here is an example. This is what would happen if I type 'ls Nue' and hit tab.
[me@mbp:/Volumes/hdd/music]: ls Neu ls Neu
Neuraxis/ Neurosis/ Neutral\ Milk\ Hotel/
If I delete the second `ls Nue', I am unable to delete the white space and the first. If I hit return, it is as if I have just entered a blank line. Does anyone know what is going on. A bit of googling suggests that this is a problem with my prompt.
"%{$fg[blue]%}[%n@%m%{$fg_bold[magenta]%}:%d%{$reset_color%}%{$reset_color%}$fg[blue]]$reset_color%}: "
Solution 1:
I'm not sure if this would cause your problem, but your prompt may need some %{%}
pairs around color sequences or other non-printing elements. If you show what the value of $PS1
is, I can check it.