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

RE: Patch available for 3.0.6-pre-5



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@xxxxxxxxxxxxxxxxxxxxxxx



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