iterm2

Color scheme not working for username and folder


I just started to use iTerm2 and imported the Dracula color theme into the Color presets. But when I open my bash terminal on my Mac, as can be seen in the screenshot below, I do not see my name first of all printed. It is because I have the following in my .bash_profile:

PS1="%{%F{033}%}%n%{%f%}@%{%F{green}%}%m:%{%F{yellow}%}%~%{$%f%}%  "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad

enter image description here

Could anyone suggest me how can I get the color presets work for iTerm2?


Solution

  • Realized I made a mistake. Here is what worked for me:

    PS1="\[\033[0;33m\]\u\[\033[0m\]@\[\033[0;32m\]\h\[\033[0m\]:\[\033[0;33m\]\w\[\033[0m\] $ "