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

updated color sequences as variables



I've been using a group of colors-put-into variables that someone put on
this list a while back, which (in the old color-coding scheme) looked like
this:

red="%{$(echo -n '\e[1;31m')%}"
green="%{$(echo -n '\e[1;32m')%}"     etc.,


and could be used (i.e., in a prompt) like this:

export prompt="$yellow($blue%n$yellow<$cyan@$yellow>$red%m$yellow($green%/$yellow)$red-$yellow> $white"

Would the coding in the variables translate -- updating to the new color scheme of
sequences -- to anything like the following?

red="%{$(\e[1;31m)%}"

if not, what would make sense here, and how would it be put into a prompt
string?  I'd like to continue using a system like this, it makes creating
a prompt much easier.

-- 
                                 // rj@xxxxxxxxx //
    City cops & state cops & national guard & bureau cops & tv cops & movie cops
     & uniform & plainclothes cops & riot cops & cops on top of cops on top of
          cops on top of cops: it's a world full of cops.     -- Paleface



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