Package: grep;
To reply to this bug, email your comments to 36612 AT debbugs.gnu.org.
the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-grep <at> gnu.org:bug#36612; Package grep.
(2019年7月12日 01:13:02 GMT) Full text and rfc822 format available.Steven Penny <svnpenn <at> gmail.com>:bug-grep <at> gnu.org.
(2019年7月12日 01:13:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Steven Penny <svnpenn <at> gmail.com> To: bug-grep <at> gnu.org Subject: Expand "no" options Date: 2019年7月11日 18:12:17 -0700 (PDT)
Grep does not have a way to disable "-i", "-n" or "-r" options. Those options
could look like this:
-N, --no-line-number
-O, --no-ignore-case
-S, --no-recursive
The single letter choices are not ideal, but "-I" and "-R" were already taken.
If these options existed, you could write a function like this:
grep_bravo() {
grep -i -n -r "$@"
}
then if you passed the new arguments like this:
grep_bravo -N -O -S charlie delta.txt
your arguments would override the function arguments, as they come after.
Paul Eggert <eggert <at> cs.ucla.edu>
to control <at> debbugs.gnu.org.
(2020年1月02日 09:42:01 GMT) Full text and rfc822 format available.bug-grep <at> gnu.org:bug#36612; Package grep.
(2022年3月21日 14:22:02 GMT) Full text and rfc822 format available.Message #10 received at 36612 <at> debbugs.gnu.org (full text, mbox):
From: ruoshu gao <bei540296467 <at> yahoo.com> To: "36612 <at> debbugs.gnu.org" <36612 <at> debbugs.gnu.org> Subject: patch for "--no-line-number" and "--no-recursive" options Date: 2022年3月21日 11:49:14 +0000 (UTC)
[Message part 1 (text/plain, inline)]
So I tried to write a patch for "--no-line-number" and "--no-recursive" options, and I think they need no short options like -N/-R.
[Message part 2 (text/html, inline)]
[0001-add-no-line-number-and-no-recursive-option.patch (application/octet-stream, attachment)]
bug-grep <at> gnu.org:bug#36612; Package grep.
(2022年3月21日 15:32:02 GMT) Full text and rfc822 format available.Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Gary Johnson <garyjohn <at> spocom.com> To: bug-grep <at> gnu.org Subject: Re: bug#36612: Expand "no" options Date: 2022年3月21日 08:32:27 -0700
On 2019年07月11日, Steven Penny wrote:
> Grep does not have a way to disable "-i", "-n" or "-r" options. Those options
> could look like this:
>
> -N, --no-line-number
> -O, --no-ignore-case
> -S, --no-recursive
>
> The single letter choices are not ideal, but "-I" and "-R" were already taken.
> If these options existed, you could write a function like this:
>
> grep_bravo() {
> grep -i -n -r "$@"
> }
>
> then if you passed the new arguments like this:
>
> grep_bravo -N -O -S charlie delta.txt
>
> your arguments would override the function arguments, as they come after.
It seems just as easy to execute
command grep charlie delta.txt
Regards,
Gary
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.