I have just installed the (awesome) oh-my-zsh package to customize my zsh prompt, but I've hit this weird problem:
If I use autocompletion on a command name (e.g. sou<TAB>
-> source
), everything works as intended. However, if I use autocompletion on a file name (e.g. source .zshr<TAB>
-> source .zshrc
), the font changes to grey bold for the whole command. I do use bold in my PROMPT
as well as colors, but not gray, so I don't know where that color code comes from; also the fact that it only happens when completing a file name puzzles me.
Here are my PROMPT
and RPROMPT
(inspired from Steve Losh's prose
theme).
PROMPT='
%B%F{208}%n%{$reset_color%}%{$fg_bold[white]%}@%B%F{039}$(box_name)
%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}
$(hg_prompt_info)$(git_prompt_info)
$(virtualenv_info)$(prompt_char) '
RPROMPT='${return_status}%{$reset_color%}[%t]'
Thanks in advance.
Actually, the solution was rather simple: color&weight changes introduces by %B and %F must be closed by %b and %f, not by $reset_color... that's all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With