diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-07-18 19:20:31 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-18 19:20:31 (GMT) |
commit | d036d667b7f297f8305ffaaec212a95da7022ebe (patch) | |
tree | 40518ad23cc91e47c395bcfc760671a77e072c2c /builtin | |
parent | eb9056358ce2cd124f769886c70e1427a0182813 (diff) | |
parent | 240cf2a25744b45c514fe850363721615a1c4b8c (diff) | |
download | git-d036d667b7f297f8305ffaaec212a95da7022ebe.zip git-d036d667b7f297f8305ffaaec212a95da7022ebe.tar.gz git-d036d667b7f297f8305ffaaec212a95da7022ebe.tar.bz2 |
Merge branch 'tb/grep-column'
"git grep" learned the "--column" option that gives not just the
line number but the column number of the hit.
* tb/grep-column:
contrib/git-jump/git-jump: jump to exact location
grep.c: add configuration variables to show matched option
builtin/grep.c: add '--column' option to 'git-grep(1)'
grep.c: display column number of first match
grep.[ch]: extend grep_opt to allow showing matched column
grep.c: expose {,inverted} match column in match_line()
Documentation/config.txt: camel-case lineNumber for consistency
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/grep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index ee753a4..61bcaf6 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -828,6 +828,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) GREP_PATTERN_TYPE_PCRE), OPT_GROUP(""), OPT_BOOL('n', "line-number", &opt.linenum, N_("show line numbers")), + OPT_BOOL(0, "column", &opt.columnnum, N_("show column number of first match")), OPT_NEGBIT('h', NULL, &opt.pathname, N_("don't show filenames"), 1), OPT_BIT('H', NULL, &opt.pathname, N_("show filenames"), 1), OPT_NEGBIT(0, "full-name", &opt.relative, |