I created a nice PS1
for bash with http://bashrcgenerator.com/, but something seems to go wrong. The terminal emulator shows me some random, characters which means that PS1
probably has a syntax error. The weird thing is that it will work after I edit it (with nano). If I add a space, remove it, save it, and run bash, it works fine. But when I log out and log in agai,n it's buggy and weird again. This is my .bashrc:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
PS1="\[$(tput sgr0)\]\033[38;5;15m\033[38;5;14m\u\[$(tput sgr0)\]\033[38;5;15m\033[38;5;15m \[$(tput sgr0)\]\033[38;5;15m\033[38;5;10m\w\[$(tput sgr0)\]\033[38;5;15m\033[38;5;15m \
\[$(tput sgr0)\]\033[38;5;15m\033[38;5;14m\\$\[$(tput sgr0)\]\033[38;5;15m\033[38;5;15m \[$(tput sgr0)\]"