This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Way too complicated

Posted by: Anonymous [ip: 24.92.13.244] on January 23, 2008 02:45 AM
that is an extremely hackish and complicated way to do it
you can do it in half a line by simply putting this in your shell rc file (.shrc , .bashrc , .zshrc, .tcshrc , etc.)
............................................................................................................................................................................................................................................................................................................................................
export PS1=\[\033[01;31m\]\u@\h \[\033[01;32m\]\@ \[\033[01;34m\]\w $ \[\033[00m\]
....................................................................
I have confirmed this to work on linux,solaris,and mac os x , the dots are so the code is all on one line

#

Return to CLI Magic: Use ANSI escape sequences to display a clock in your terminal