[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Unsupported grep options
From: |
Jamboretz, Chris |
Subject: |
RE: Unsupported grep options |
Date: |
Fri, 4 Mar 2022 14:00:57 +0000 |
Thanks Antonio!
--colour and -NUM are not necessary. If I find them being used I'll change
them. The --silent and -P option are used a lot.
Best regards,
Chris Jamboretz
-----Original Message-----
From: Antonio Diaz Diaz <antonio@gnu.org>
Sent: Thursday, March 3, 2022 8:24 PM
To: Jamboretz, Chris <chris.jamboretz@intel.com>
Cc: zutils-bug@nongnu.org
Subject: Re: Unsupported grep options
Jamboretz, Chris wrote:
> First let me say thanks for providing this set of tools.
You are welcome. :-)
> I've found some unsupported command line options and the first three
> are probably the biggest concern:
>
> --silent
> -P --perl-regexp
> --colour
I can easily implement these, but is --colour really needed? I generally
dislike implementing spelling variations, but this one is specially confusing
because GNU grep does accept an environment variable named GREP_COLORS but none
named GREP_COLOURS.
> others are
>
> -G --basic-regexp
> -U --binary
> -u --unix-byte-offsets
'-u, --unix-byte-offsets' is going to be removed next year from GNU grep:
https://git.savannah.gnu.org/cgit/grep.git/plain/src/grep.c
case 'u':
/* Obsolete option; it had no effect; FIXME: remove in 2023 */
error (0, 0, _("warning: --unix-byte-offsets (-u) is obsolete"));
break;
> -T --initial-tab
> -NUM
I don't see how -NUM can be implemented while respecting the syntax of command
line arguments[1] where '-23' would mean '-C2 -C3', not '-C23'. I would
recommend to use -C instead of the non-standard grep "option" -NUM.
[1]
http://www.nongnu.org/arg-parser/manual/arg_parser_manual.html#Argument-syntax
> --line-buffered
> --label=LABEL
No problem with these either.
I'll release a new version of zutils with the new options ASAP (in a few days).
Best regards,
Antonio.