On Wed, Dec 27, 2006 at 05:27:19PM -0500, Kamaraju Kusumanchi wrote:
> Package: devscripts
> Version: 2.9.26
> Followup-For: Bug #404635
> 
> A little more debugging, I found that the culprit is either of GREP_OPTIONS,
> GREP_COLOR environment variables. Both these options are documented in the man
> page of grep. On my machine I have
> 
> $echo $GREP_OPTIONS
> --color=always
> 
> $echo $GREP_COLOR
> 1;32
> 
> With these variables, I get the errors reported in the first email of this bug
> report.  However If I unset GREP_OPTIONS then devscripts seem to work fine.
> 
> $unset GREP_OPTIONS

I have remembered the correct fix for this bug.  I assume your default
shell is bash, otherwise you will have to adapt this appropriately.
In your ~/.bashrc, you write:

if [ ! -z "$PS1" ]; then
  function grep(){ command grep --color=always "$@"; }
fi

(In your ~/.bash_profile, you do not need to protect this function
command with the $PS1 check, as it's a login shell.)

Alternatively, put all such function (re)definitions in a separate
file which you unconditionally source from .bash_profile, but surround
by the $PS1 check in .bashrc (which is how I do it).  And then don't
set GREP_OPTIONS at all.

HTH,

   Julian


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

Reply via email to