grep: add --break

With --break, an empty line is printed between matches from different
files, increasing readability.  This option is taken from ack
(http://betterthangrep.com/).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2011-06-05 17:24:25 +02:00
committed by Junio C Hamano
parent 08303c3636
commit a8f0e7649e
5 changed files with 40 additions and 3 deletions

1
grep.h
View File

@ -110,6 +110,7 @@ struct grep_opt {
unsigned post_context;
unsigned last_shown;
int show_hunk_mark;
int file_break;
void *priv;
void (*output)(struct grep_opt *opt, const void *data, size_t size);