[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Colors in the prompt like in slackware ?



     To also have .gz and .tgz in read quite like in slackware, you may
also try putting in /etc the file I send as attachment and in /etc/profile
these lines: 

# set up the color-ls environment variables:
if [ "$SHELL" = "/bin/zsh" ]; then
  eval `dircolors -z`
elif [ "$SHELL" = "/bin/ash" ]; then
  eval `dircolors -s`
else
  eval `dircolors -b`
fi

     I confess that I copied everything pretty "monkeyshly" from an old
Slackware I removed long ago (when I noticed that for a veeery long time I
had been booting and using Debian only), maybe those tests on $SHELL are
unuseful with Debian... Actually I left them to set up the prompt too,

if [ "$SHELL" = "/bin/pdksh" -o "$SHELL" = "/bin/ksh" ]; then
 PS1="! $ "
elif [ "$SHELL" = "/bin/zsh" ]; then
 PS1="%m:%~%# "
elif [ "$SHELL" = "/bin/ash" ]; then
 PS1="$ "
else
 PS1='\h:\w\$ '
fi
PS2='> '
export PS1 PS2

though in this mailing list *MUCH* simpler commands appeared for that aim
quite recently.

     Nicola Bernardelli <nbern@mail.protos.it>
---------------------------------------------------------------------------
     Please use <n.bern@mail.protos.it> for messages from any kind of
robot, such as mailing lists. From that address no autoresponse
messages will return even when I'm not at home.
---------------------------------------------------------------------------

On Thu, 4 Sep 1997, Heikki Vatiainen wrote:

> See /usr/doc/fileutils/color-ls.gz which describes how to get colors in 
> the directory listings. The quick answer is:
> 
>   ls --color
> or
>   alias ls='ls --color=auto'
> 
> in sh type shells.
> 
> I hope this helps.
> 
> // Heikki
> -- 
> Heikki Vatiainen                  * hessu@cs.tut.fi
> Tampere University of Technology  * Tampere, Finland
> 
> 
> 
> --
> TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> debian-user-request@lists.debian.org . 
> Trouble?  e-mail to templin@bucknell.edu .
> 
> 
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.

# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty

# Extra command line options for ls go here.
# Basically these ones are:
#  -F = show '/' for dirs, '*' for executables, etc.
#  -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0

# Below, there should be one TERM entry for each termtype that is colorizable
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM xterm
TERM vt100

# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes: 
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00	# global default, although everything should be something.
FILE 00 	# normal file
DIR 01;34 	# directory
LINK 01;36 	# symbolic link
FIFO 40;33	# pipe
SOCK 01;35	# socket
BLK 40;33;01	# block device driver
CHR 40;33;01 	# character device driver

# This is for files with execute permission:
EXEC 01;32 

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 01;32 # executables (bright green)
.exe 01;32
.com 01;32
.btm 01;32
.bat 01;32
.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z   01;31
.Z   01;31
.gz  01;31
.jpg 01;35 # image formats
.gif 01;35
.bmp 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35

Reply to: