I am using:
red=$(tput setaf 1)
green=$(tput setaf 2)
blue=$(tput setaf 4)
reset=$(tput sgr0)
export PS1="\[$red\]\u\[$reset\]@\[$green\]\h\[$reset\]:\[$blue\]\w\[$reset\]\$ "
export EDITOR=nano
This is what shows: []\u[]@[]\h[]:[]\w[]$
How can I fix this? Seems like bash does not interprete the special characters.
echo $TERMfor you? – Aleksandr Levchuk Jul 4 '11 at 1:40~/.bashrcand you shouldn't exportPS1, which is a shell setting and not an environment variable. If the lines aren't in.bashrc, put them there and read this. – Gilles Jul 4 '11 at 6:52