colorful command prompts
Since I started out with Gentoo, I’m used to colors in virtual consoles and terminal emulators. There’s a small but vocal group of Gentooers who hate them and switch everything to monochrome, but I couldn’t live with that at this point. Slackware sticks with basic white-on-black, so I have to tweak things a little. Father-of-Gentoo Daniel Robbins has a good tutorial on tweaking the command prompt on his website. In my ~/.bashrc, I use
export PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] "
which results in a prompt that looks like this:
Ouch, that looks much better in the middle of a console than it does against the white background of my blog. Oh, well.
For root’s prompt, I use a bright yellow hash prompt that reminds me to be careful. I also don’t display the working directory; if I’m root I’ve already made sure I know where I am.
export "PS1=\[\033[01;31m\]\h\[\033[01;34m\] \W \[\033[01;33m\]\\$\[\033[00m\] "