bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36612: Expand "no" options


From: Gary Johnson
Subject: bug#36612: Expand "no" options
Date: Mon, 21 Mar 2022 08:32:27 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]