Package: a lot of them

I've recently set GREP_OPTIONS='--color=always' in my bashrc. I do this mainly so that I can see grep's highlighted findings even when viewing through a pipeline, such as with less. '--color=auto' won't work because it will turn off the color escapes if it's going down the pipeline, which is not what I want when I use less.

This poses a problem for a lot of scripts, which assume that text coming from their stdin is free from (color) escapes. For instance, I recently went to install postgresql-client-8.2 in Ubuntu. (I recognize that Ubuntu != Debian. However, this is also a problem in Etch that I just didn't report earlier, and I think it could be addressed in both distros.)

> $ sudo apt-get install postgresql
>    ...
Setting up postgresql-client-8.2 (8.2.7-0ubuntu0.7.10) ...
update-alternatives: unable to make 
/usr/share/postgresql/8.2/man/man1/dropuser.1.gz.dpkg-tmp a symlink to 
/etc/alternatives/dropuser.1.gz: No such file or directory

^^^^^^^^^^^^^^^^^^^^^^^

The ^^^^ is color-escaped, which is no good for the symlinking.

I think an appropriate solution would be to unset or export GREP_OPTIONS='--color=none' in the beginning of scripts that rely on grep.

Kevin



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to