Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

coloring the command-line?



i'd like to have all the commands i type in (some) zsh shells appear
in a color other than regular gray

at the moment, i'm doing this in PS1

export PS1='^[[0;31m%# '

and it works decently, but has the drawback of screwing up alignment
in some odd ways:

if i use ^R to start a history search, the cursor jumps forward eight characters

if i type off the end of the screen, it loops around to the beginning

if i pull up a more-than-one-screen command with an up-arrow and start
backing up to edit an early part of it, the cursor jumps to the line
above

etc.

i assume there's a better state to leave the tty in that doesn't have
these side effects?
-- 
Aaron Davies
aaron.davies@xxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author