• R
    grep: add --heading · 1d84f72e
    René Scharfe 提交于
    With --heading, the filename is printed once before matches from that
    file instead of at the start of each line, giving more screen space to
    the actual search results.
    
    This option is taken from ack (http://betterthangrep.com/).  And now
    git grep can dress up like it:
    
    	$ git config alias.ack "grep --break --heading --line-number"
    
    	$ git ack -e --heading
    	Documentation/git-grep.txt
    	154:--heading::
    
    	t/t7810-grep.sh
    	785:test_expect_success 'grep --heading' '
    	786:    git grep --heading -e char -e lo_w hello.c hello_world >actual &&
    	808:    git grep --break --heading -n --color \
    Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    1d84f72e
grep.h 2.9 KB