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

Colored WATCHFMT ?



Is it possible to put colors to WATCHFMT? Here is what I have achieved by
far:

WATCH_COLOR_MY_NUMBER_DATE="%{"$'\e[32;40m'"%}"

WATCH_COLOR_RESET="%{"$'\e[39;49;00m'"%}"

export WATCHFMT="[%B${WATCH_COLOR_MY_NUMBER_DATE}${MY_NUMBER_DATE} ${MY_TIME}${WATCH_COLOR_RESET}%b] %B%n%b has %a %B%l%b from %B%M%b"

juhtolv@heresy:/home/juhtolv % log
[%{%}2001-07-28 11:23:15%{%}] juhtolv has logged on pts/0 from :0
[%{%}2001-07-28 11:24:06%{%}] juhtolv has logged on pts/2 from :0:S.0
[%{%}2001-07-28 11:24:56%{%}] juhtolv has logged on pts/3 from :0
[%{%}2001-07-28 11:40:18%{%}] juhtolv has logged on pts/4 from :0:S.1
[%{%}2001-07-28 14:02:22%{%}] juhtolv has logged on pts/6 from :0
juhtolv@heresy:/home/juhtolv % 

I can see green color in right places, but those curly braces and
percent signs are really annoying. So, what I should do?

Originally it was like this:

export WATCHFMT="[%B${MY_NUMBER_DATE} ${MY_TIME}%b] %B%n%b has %a %B%l%b from %B%M%b"

And it looked like this:

juhtolv@heresy:/home/juhtolv % log
[2001-07-28 11:23:15] juhtolv has logged on pts/0 from :0
[2001-07-28 11:24:06] juhtolv has logged on pts/2 from :0:S.0
[2001-07-28 11:24:56] juhtolv has logged on pts/3 from :0
[2001-07-28 11:40:18] juhtolv has logged on pts/4 from :0:S.1
[2001-07-28 14:02:22] juhtolv has logged on pts/6 from :0
juhtolv@heresy:/home/juhtolv % 


-- 
Juhapekka "naula" Tolvanen * * U of Jyväskylä * juhtolv@xxxxxxxxx
http://www.st.jyu.fi/~juhtolv/spam.html * STRAIGHT BUT NOT NARROW
-----------------------------------------------------------------
"Bestrafe mich. bestrafe mich. Stroh wird Gold und Gold wird
Stein. deine Grösse macht mich klein. du darfst mein Bestrafer
sein. Der Herrgott nimmt, der Herrgott gibt."           Rammstein



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