[PATCH] Improve support for long options to grep

Walter Lozano walter.lozano at collabora.com
Mon Jan 24 16:12:25 UTC 2022


Hi David,

On 1/24/22 12:32, David Laight wrote:
> From: Walter Lozano
>> Sent: 24 January 2022 14:48
>>
>> In order to improve compatibility with GNU grep improve support for long
>> options to busybox grep.
> 
> Why?
> Does anyone ever actually type these long strings?
> Looks like bloat to me.

Thank you for your feedback. As you mentioned it is very rare that 
people type those long strings. However, scripts that try to be more 
readable might use them.

In my specific use case, I try to run some Debian scripts, that make use 
of some of those long options, of course not all of them. Since I was 
already there I thought it would be nice to add them, since these kind 
of overhead can be enabled only if needed.

 From my understanding long options were enabled if 
ENABLE_FEATURE_GREP_CONTEXT, which has some sense, since the color
would be a nice improvement in that case.

Following the idea that users who use ENABLE_FEATURE_GREP_CONTEXT with 
color are looking for a full featured grep I thought that no additional 
configuration options should we created to handle this.

I still think that this patch has value since other people might also be 
looking for improved compatibility, and this is only enabled by config 
options.

Regards,

Walter

-- 
Walter Lozano
Collabora Ltd.


More information about the busybox mailing list