From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: RE: Patch available for 3.0.6-pre-5
Date: Mon, 21 Jun 1999 11:47:51 +0200 (MET DST) [thread overview]
Message-ID: <199906210947.LAA22073@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Mon, 21 Jun 1999 13:35:56 +0400
Andrej Borsenkow wrote:
> So - what should I put in ZLS_COLORS to get colored listing?
For starters, you can just try an empty string (I've added default
values -- those that are mentioned in my GNU-ls manual).
Otherwise it looks termacapish: a colon-separated list of `<cap>=<val>'.
Where <val> is a number (on a vt* terminal or xterm):
1 for bold
4 for underlined
7 for standout
3[0-7] for foreground colours
4[0-7] for background colours
...for the colours you need an xterm that can display them, of course.
The rest form the ls-manual I have:
You can override the default colors by defining the envi-
ronment variable LS_COLORS (or LS_COLOURS). The format of
this variable is reminicent of the termcap(5) file format;
a colon-separated list of expressions of the form
"xx=string", where "xx" is a two-character variable name.
The variables with their associated defaults are:
no 0 Normal (non-filename) text
fi 0 Regular file
di 32 Directory
ln 36 Symbolic link
pi 31 Named pipe (FIFO)
so 33 Socket
bd 44;37 Block device
cd 44;37 Character device
ex 35 Executable file
mi (none) Missing file (defaults to fi)
or (none) Orphanned symbolic link (defaults to ln)
lc \e[ Left code
rc m Right code
ec (none) End code (replaces lc+no+rc)
You only need to include the variables you want to change
from the default.
File names can also be colorized based on filename exten-
sion. This is specified in the LS_COLORS variable using
the syntax "*ext=string". For example, using ISO 6429
codes, to color all C-language source files blue you would
specify "*.c=34". This would color all files ending in .c
in blue (34) color.
Control characters can be written either in C-style
\-escaped notation, or in stty-like ^-notation. The C-
style notation adds \e for Escape, \_ for a normal space
characer, and \? for Delete. In addition, the \ escape
character can be used to override the default interpreta-
tion of \, ^, : and =.
Each file will be written as <lc> <color code> <rc> <file-
name> <ec>. If the <ec> code is undefined, the sequence
<lc> <no> <rc> will be used instead. This is generally
more convenient to use, but less general. The left, right
and end codes are provided so you don't have to type com-
mon parts over and over again and to support weird termi-
nals; you will generally not need to change them at all
unless your terminal does not use ISO 6429 color sequences
but a different system.
If your terminal does use ISO 6429 color codes, you can
compose the type codes (i.e. all except the lc, rc, and ec
FSF GNU File Utilities 5
LS(1) LS(1)
codes) from numerical commands separated by semicolons.
The most common commands are:
0 to restore default color
1 for brighter colors
4 for underlined text
5 for flashing text
30 for black foreground
31 for red foreground
32 for green foreground
33 for yellow (or brown) foreground
34 for blue foreground
35 for purple foreground
36 for cyan foreground
37 for white (or gray) foreground
40 for black background
41 for red background
42 for green background
43 for yellow (or brown) background
44 for blue background
45 for purple background
46 for cyan background
47 for white (or gray) background
Not all commands will work on all systems or display
devices.
A few terminal programs do not recognize the default end
code properly. If all text gets colorized after you do a
directory listing, try changing the no and fi codes from 0
to the numerical codes for your standard fore- and back-
ground colors.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-06-21 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-21 9:47 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-06-21 10:56 Sven Wischnowsky
1999-06-21 9:38 Sven Wischnowsky
1999-06-21 9:55 ` Andrej Borsenkow
1999-06-21 9:05 Sven Wischnowsky
1999-06-21 9:35 ` Andrej Borsenkow
1999-06-19 6:49 Bart Schaefer
1999-06-19 21:14 ` Bart Schaefer
1999-06-20 15:29 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199906210947.LAA22073@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).