This is a little kit to be use together with a terminal which
understands ansi color codes (such as xterm). It gives examples on
how to use the colors.

--------------------------------------------------------------------------
supplied files: 
README      - this introduction
tux         - display the linux penguin in ansi colors (can be run from .login)
showansicol - display the different ansi colors
tcshrc      - a sample .tcshrc file (shows how to set prompt and aliases)
bashrc      - a sample .bashrc file (shows how to set prompt and aliases)
README.sun  - additional info for sun solaris users
ls.sun-solaris - aslo for sun solaris users only

This kit was put together by Guido Socher <guido.s@writeme.com>
--------------------------------------------------------------------------
The shell script showansicol display the different ansi colors in the shell.
Run showansicol if you want to know which colors are available and what
codes they have.

--------------------------------------------------------------------------
To have different file types with different colors you need
the gnu ls command. This version of ls can produce the correct
escape sequences for color xterm. To get the colors run:
ls -F --color=tty

This can be customized by setting the environment variable LS_COLORS.
The syntax is expr_matching_file=color_codes:
In tcsh this is:
setenv LS_COLORS '*.fm=44;31;1:*.ppt=44;33;1:*.doc=44;33;1:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.mpg=01;37:*.avi=01;37:*.gl=01;37:*.dl=01;37:'
--------------------------------------------------------------------------
You can also customize the command prompt of your shell and
introduce colors in the prompt. This is e.g useful if you are logged
into different machines or work with differnent users and you would
like to be able distinguish them easily.

The supplied tcshrc and bashrc files show how to do this for the
respective shells. You can source the files to try it out. Afterwards you 
can copy the relevant lines into you own startup files. 
Note: The set prompt=... and PS1=... lines contains escape characters and
      copy and past with the middle mouse button from one xterm to another
      may not work. You must use an editor which is 8-bit clean and supports
      multiple editing buffers to copy between (You can e.g use emacs and split
      the window). 
The syntax to get the colors in the command prompt is always:
Start bold:
ESC[bgcolor;fgfolor;1
Start normal:
ESC[bgcolor;fgfolor
End color:
ESC[00m
The ESC is a literal escape character (Octal 033, Hex 1B).

The prompt (PS1 for bash and prompt variable for tcsh) should be
set in the .bashrc for bash and the .tcshrc for tcsh.

Here is also some general info (not about color codes) concerning the
syntax of the prompt for bash and tcsh. These are excerpts from the
man pages:

Tcsh Prompt Escape Sequences
----------------------------
The format for the prompt shell variable has been changed to
include  many  new  things, such as the current time of day,
current  working  directory,  etc..   The  new  format  uses
"%<char>"  to signal an expansion, much like printf(3S). The
available sequences are:

      %/          Current working directory.
      %~          cwd.  If it starts with $HOME, that part is
                  replaced by a ~. In addition if a directory
                  name prefix matches a user's home directory,
                  that part of the directory will be substituted
                  with ~user. NOTE: The ~user substitution will
                  only happen if the shell has performed a ~
                  expansion for that user name in this session.
      %c or %.    Trailing component of cwd, may be
                  followed by by a digit to get more than one
                  component, if it starts with $HOME, that
                  part is replaced with a ~.
      %C          Trailing component of cwd, may be followed
                  by a digit to get more than one component, no
                  ~ substitution.
      %h, %!, !   Current history event number.
      %M          The full machine hostname.
      %m          The hostname up to the first ".".
      %S (%s)     Start (stop) standout mode.
      %B (%b)     Start (stop) boldfacing mode. (Only if
                  tcsh was compiled to be eight bit clean.)
      %U (%u)     Start (stop) underline mode. (Only if
                  tcsh was compiled to be eight bit clean.)
      %t or %@    Current time of day, in 12-hour, am/pm format.
      %T          Current time of day, in 24-hour format.
                  (But see the ampm shell variable below.)
      %p          Current time in 12-hour format, am/pm format with seconds

      %P          Current time in 24-hour format, with seconds.
      \c          `c' is parsed the same way as in bindkey.
      ^c          `c' is parsed the same way as in bindkey.
      %%          A single %.
      %n          The user name, contents of $user.
      %d          The weekday in <Day> format.
      %D          The day in dd format.
      %w          The month in <Mon> format.
      %W          The month in mm format.
      %y          The year in yy format.
      %Y          The year in yyyy format.           
      %l          The line (tty) the user is logged on.
      %L          clear from prompt to end of display or end of line.
      %#          A `#' if tcsh is run as a root shell,
                  a `>' if not.
      %{..%}      Include string as a literal escape sequence.
                  Note that the enclosed escape sequence, should
                  only be used to change terminal attributes and
                  should not move the cursor location. Also, this
                  cannot be the last character in the prompt
                  string. (Available only if tcsh was compiled to
                  be eight bit clean.)
      %?          return code of the last command executed just
                  before the prompt.
      %R          In prompt3 this is the corrected string; in
                  prompt2 it is the status of the parser.

On %C, %c and %., if the optional digit is 0, then then next
digit  is  interpreted as the number of directory components
to be skipped, and the  number  of  components  skipped  are
reported as: /<num-skipped>path/path.

The sequences for standout are often used to  indicate  that
this is an enabled (running as root) shell.  An example:

      > set prompt="%m [%h] %U[%@]%u [%/] you rang? "
      tut [37] [2:54pm] [/usr/accts/sys] you rang? _

In addition, there is a new variable, prompt2, which is used
to prompt for the body of while and for loops (wherever nor-
mal csh prompts with a  question  mark).   The  default  for
prompt2  is  "%R?  ": the status of the parser followed by a
question mark.  This alternate prompt is also used when  the
parser  is  waiting  for  more input; i.e. when the previous
line ended in a  \.   The  prompt3  variable  is  used  when
displaying  the  corrected command line when automatic spel-
ling correction is in effect;  it  defaults  to  "CORRECT>%R
(y|n|e)? ".

Bash Prompt Escape Sequences 
----------------------------

    When executing interactively, bash  displays  the  primary
    prompt  PS1  when  it  is ready to read a command, and the
    secondary prompt PS2 when it needs more input to  complete
    a  command.   Bash  allows these prompt strings to be cus-
    tomized by inserting a number of backslash-escaped special
    characters that are decoded as follows:
           \a     an ASCII bell character (07)
           \d     the  date  in  "Weekday  Month  Date" format
                  (e.g., "Tue May 26")
           \e     an ASCII escape character (033)
           \h     the hostname up to the first `.'
           \H     the hostname
           \n     newline
           \r     carriage return
           \s     the name of the shell, the  basename  of  $0
                  (the portion following the final slash)
           \t     the current time in 24-hour HH:MM:SS format
           \T     the current time in 12-hour HH:MM:SS format
           \@     the current time in 12-hour am/pm format
           \u     the username of the current user
           \v     the version of bash (e.g., 2.00)
           \V     the  release  of  bash, version + patchlevel
                  (e.g., 2.00.0)
           \w     the current working directory
           \W     the basename of the current  working  direc-
                  tory
           \!     the history number of this command
           \#     the command number of this command
           \$     if  the effective UID is 0, a #, otherwise a
                  $
           \nnn   the character  corresponding  to  the  octal
                  number nnn
           \\     a backslash
           \[     begin a sequence of non-printing characters,
                  which could be used to embed a terminal con-
                  trol sequence into the prompt
           \]     end a sequence of non-printing characters

--------------------------------------------------------------------------

