On Wednesday 07 November 2001 15:31, Jason Machacek wrote:
> Is there any way to make the ls command permanently use the
> --color option?
>
> Thanks,
> Jason Machacek

Usually the default install of debian already includes a bunch 
of alias options in the file located at /home/you/.bashrc.  

Here's what was in mine after install:
# If running interactively, then:
if [ "$PS1" ]; then

    # enable color support of ls and also add handy aliases

    eval `dircolors`
    alias ls='ls --color=auto '
    alias ll='ls -l'
    alias la='ls -A'
    alias l='ls -CF'
    alias dir='ls --color=auto --format=vertical'
    alias vdir='ls --color=auto --format=long'

    # set a fancy prompt

    PS1='[EMAIL PROTECTED]:\w\$ '
fi

If you are not getting color it's probably because the beginning 
of the line has a "#" in front of it.  Simply delete those where 
appropriate.

I believe the $PS1 test also addresses the issue of 
non-interactive scripts parsing the output of ls as well so this 
is probably just fine.

HTH,
Jesse

Reply via email to