[packages/grep] - move from GREP_OPTIONS environmental variable to alias due to its obsolescence

Jacek Konieczny jajcus at jajcus.net
Wed Dec 10 14:38:20 CET 2014


On 10/12/14 14:14, Arkadiusz Miśkiewicz wrote:
> On Wednesday 10 of December 2014, Jacek Konieczny wrote:
>> On 10/12/14 12:46, Arkadiusz Miśkiewicz wrote:
>>> Maybe something like that would be better?
>>>
>>> # cat /etc/shrc.d/grep.sh
>>> if [ -r /etc/env.d/GREP_OPTIONS ]; then
>>>
>>>         unset GREP_OPTIONS
>>>         . /etc/env.d/GREP_OPTIONS
>>>         if [ -n "$GREP_OPTIONS" ]; then
>>>         
>>>                 alias grep="/bin/grep $GREP_OPTIONS"
>>>                 unset GREP_OPTIONS
>>>         
>>>         fi
>>>
>>> fi
>>
>> Why?
> 
> For backward compat with what we had so far.

Such a shell script for any interactive shell started, just because one
or two PLD users have uncommented the /etc/env.d/GREP_OPTIONS we might
have wrongly introduced long time ago?

I don't think it is worth it.

Keeping backward compatibility for any strange feature we might have
once thought it was a good idea would only make more and more mess in
our distribution. I would say: let's break compatibility whenever we can
get things simpler/safer/more functional this way and the compatibility
cost is not too big. If the system won't boot because of the change,
then it might be a good idea to introduce backward-compatibility hack.
This is not such a case.

Jacek



More information about the pld-devel-en mailing list