Closed smac89 closed 3 years ago
The --format
option does not honor -v
and the context options -A
, -B
, -C
, and -y
. Perhaps a warning is in order when any of those are used. It makes sense to support at least -v
actually.
The man ugrep
page states at the end of section FORMAT:
The context options -A, -B, -C, -y, and options -v, --break, --heading,
--color, -T, and --null have no effect on formatted output.
I agree this requires reading the whole section! So I don't expect everyone to know this.
I'll make a change in v3.1 to support -v
and update the --format
man page to state that context options -A
, -B
, -C
, and -y
are ignored.
Awesome sauce. Thanks for the clarification.
Implemented in v3.1.
Before I start, I have aliased
egrep
toalias egrep='ugrep --sort --extended-regexp --binary --empty --hidden'
.So I wanted to find all non directories within an arch package, so I used the command:
The output was:
Which is good. But I wanted to do something with those files, so the default formatting wouldn't have worked very well for me. So I tried to format the output to just print the file names, so I added the option
--format='%O%~'
:And now the output turned into:
As you can see, it now seems to be ignoring the
--invert-match
option and is instead matching the regex. Is this a bug or am I just not using the format options correctly?Thanks for your time.