sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit eeeb7a6e53ae54b795f47131bf36227d6fd3fe87
parent 16159a61acfad96a8a9905ffd01e3e048a0f1820
Author: Quentin Rameau <quinq@fifth.space>
Date:   Tue,  5 Jan 2016 14:52:46 +0100

grep: make E and F flags mutually exclusive

Don't make F the priority flag when both E and F are given, instead use
the last one.

Diffstat:
Mgrep.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/grep.c b/grep.c @@ -183,10 +183,13 @@ main(int argc, char *argv[]) ARGBEGIN { case 'E': Eflag = 1; + Fflag = 0; flags |= REG_EXTENDED; break; case 'F': Fflag = 1; + Eflag = 0; + flags &= ~REG_EXTENDED; break; case 'H': Hflag = 1;