Re: ls in color
On Sat, Jul 26, 2003 at 06:59:14PM +0800, Johnny wrote:
> As of what I saw in slackware, ls is capable of displaying itz results in
> color. But up till what I have seen in debian, the ls in debian seems to be
> black and white. Can anyone tell me how to turn the color option on? btw
> ls --color=auto does not work
>
with this .bashrc the results of "ls |less" are too coloured.
#-------------------------------------------------------
# enable color support of ls and also add handy aliases
#-------------------------------------------------------
alias ls='ls -hF --color' # add colors for filetype recognition
alias ll='ls -la |less '
alias la='ls -A'
# alias l='ls -CF'
alias l='ls | less'
# alias dir='ls --color=auto --format=vertical'
# alias vdir='ls --color=auto --format=long'
#-----------------
# tailoring 'less'
#-----------------
export PAGER=less
export LESSCHARSET='latin1'
export LESS='-i -w -z-4 -g -M -X -F -R -P%t?f%f:stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'
man less, explain the environment variables LESSCHARSET and LESS ....
hth
--
Gerard
Reply to: