Red Hat Topics - turining off highlighting just for me

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > February 2005 > turining off highlighting just for me





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author turining off highlighting just for me
tony

2005-02-07, 7:45 am

Hello,
I use putty to log into a redhat 8.0 box. Dont like the colors when do
ls - cant read the blue text cos monitor not brilliant.
in vim can use :no highlight i guess

Have found /etc/colorsls.sh, but I dont want to alter settings for
other people.
looked at putty>window>colors but cant quite see how to get just black
and white.

I guess there is an easy way to do this (black and white all the time
just for me), but cant think what it is.

Anyone?

TIA

Tony
Sandgroper

2005-02-07, 5:45 pm


"tony" <tony_barratt@hotmail.com> wrote in message
news:a3a05820.0502070418.65994cb1@posting.google.com...
> Hello,
> I use putty to log into a redhat 8.0 box. Dont like the colors when do
> ls - cant read the blue text cos monitor not brilliant.
> in vim can use :no highlight i guess
>
> Have found /etc/colorsls.sh, but I dont want to alter settings for
> other people.
> looked at putty>window>colors but cant quite see how to get just black
> and white.
>
> I guess there is an easy way to do this (black and white all the time
> just for me), but cant think what it is.


To create a command to do what you want is easy , all you need to do is
create an alias and put the command into your .bash_profile file on the RH
box and export the alias.

The command to put in the .bash_profile is :
alias 'list=ls --color=never $1'

Then add the alias "list" to the export command in the same file.

I have used the alias , "list" , for the ls command , you can change it to
what is best for you.

The alias command also has a variable $1 , this is so that you can use it
with any directory and also with any normal ls switch to give a full
directory listings.

After you edit the .bash_profile , to restart the new environment use the
command :
.. .bash_profile.

( note the 2 dots )


--
Sandgroper
----------------------------------
Remove KNICKERS to Email
steveray@KNICKERSiinet.net.au





Scott Lurndal

2005-02-07, 5:45 pm

tony_barratt@hotmail.com (tony) writes:
>Hello,
>I use putty to log into a redhat 8.0 box. Dont like the colors when do
>ls - cant read the blue text cos monitor not brilliant.
>in vim can use :no highlight i guess
>
>Have found /etc/colorsls.sh, but I dont want to alter settings for
>other people.
>looked at putty>window>colors but cant quite see how to get just black
>and white.
>
>I guess there is an easy way to do this (black and white all the time
>just for me), but cant think what it is.
>
>Anyone?
>


add
unalias ls

to your .profile and/or .bashrc. In fact you should add this to all
your shell scripts too, so you won't get unexpected results when
processing the output of ls. I use 'unalias -a' at the front of
my shell scripts.

I find the default use by most distributions of colorls to be quite
annoying myself and turn it off for all logins by removing
/etc/profile.d/colorls.*

scott
Robert Nichols

2005-02-08, 5:45 pm

In article <UgONd.2751$ZZ.2252@newssvr23.news.prodigy.net>,
Scott Lurndal <slp53@pacbell.net> wrote:
:
:add
: unalias ls
:
:to your .profile and/or .bashrc. In fact you should add this to all
:your shell scripts too, so you won't get unexpected results when
:processing the output of ls. I use 'unalias -a' at the front of
:my shell scripts.

Aliases are expanded only in interactive shells unless you've gone out
of your way to enable alias expansion ("shopt -s expand_aliases") in a
script.

--
Bob Nichols AT comcast.net I am "rnichols42"
Scott Lurndal

2005-02-09, 2:45 am

Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> writes:
>In article <UgONd.2751$ZZ.2252@newssvr23.news.prodigy.net>,
>Scott Lurndal <slp53@pacbell.net> wrote:
>:
>:add
>: unalias ls
>:
>:to your .profile and/or .bashrc. In fact you should add this to all
>:your shell scripts too, so you won't get unexpected results when
>:processing the output of ls. I use 'unalias -a' at the front of
>:my shell scripts.
>
>Aliases are expanded only in interactive shells unless you've gone out
>of your way to enable alias expansion ("shopt -s expand_aliases") in a
>script.
>


Only if you are using bash in non-posix mode. ksh92, pdksh and posix shells in
general all expand aliases irrespective of interactive vs. non-interactive.

All _portable_ shell scripts should start with "unalias -a".

scott
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com