Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Colors (prompts, etc..)
- X-seq: zsh-users 419
- From: Robert Sink <sinkr@xxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Colors (prompts, etc..)
- Date: Sun, 22 Sep 1996 23:36:44 -0400 (EDT)
With all the talk here recently of colorizing this and that, I sat down and
worked on a small project that I had been intending to do for a long while
now.
What I have done is not ingenious or clever, yet I am proud of the results
(while using a rxvt/color-xterm) and maybe my time will save someone else
just that.
I too the basic colors and put them into variables:
# Lets set up the necessary colors that we will use elsewhere.
grey="%{$(echo -n '\e[1;30m')%}"
red="%{$(echo -n '\e[1;31m')%}"
green="%{$(echo -n '\e[1;32m')%}"
yellow="%{$(echo -n '\e[1;33m')%}"
blue="%{$(echo -n '\e[1;34m')%}"
magenta="%{$(echo -n '\e[1;35m')%}"
cyan="%{$(echo -n '\e[1;36m')%}"
white="%{$(echo -n '\e[1;37m')%}"
lored="%{$(echo -n '\e[0;31m')%}"
logreen="%{$(echo -n '\e[0;32m')%}"
loyellow="%{$(echo -n '\e[0;33m')%}"
loblue="%{$(echo -n '\e[0;34m')%}"
lomagenta="%{$(echo -n '\e[0;34m')%}"
locyan="%{$(echo -n '\e[0;35m')%}"
lowhite="%{$(echo -n '\e[0;36m')%}"
I use these like this for my prompt:
export prompt="$yellow($blue%n$yellow<$cyan@$yellow>$red%m $yellow($green%/$yellow)$red-$yellow> $white"
While some may consider this prompt too long, or perhaps my color scheme gaudy,
I find it aesthetically pleasing and the path information absolutely necessary.
Machine name is nice since I work in a multi-machine environment, and userid is
nice since I 'ksu to root' at lot.
Anyhow, here they are - enjoy!
--
-------------------------------------------------------------------------
|:| Robert Sink |"If we dive deep enough can we see under |:|
|:| sinkr@xxxxxxxxxxxxxxxxxxx| the island?." |:|
|:|---------------------------------------------------------------------|:|
|:| Server Installation / Maintenance - Digital Express Group, Inc. |:|
-------------------------------------------------------------------------
*PGP 2.6.2 Public Key Available via the PGP Server:*
*pgp-public-keys@xxxxxxxxxxx*
Messages sorted by:
Reverse Date,
Date,
Thread,
Author