diff options
author | Joe Ratterman <jratt0@gmail.com> | 2011-03-28 13:11:55 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-28 14:02:12 -0700 |
commit | 7d6cb10b84d9931aacf1914db192cbeaaa88443d (patch) | |
tree | 5b8907e0803db3457f3c9e781dc77574cf4205d4 /builtin/grep.c | |
parent | 78bc46675353e4833a59e0f4dfa47d57a9c1a46b (diff) | |
download | git-7d6cb10b84d9931aacf1914db192cbeaaa88443d.tar.gz |
grep: Add the option '--line-number'
This is a synonym for the existing '-n' option, matching GNU grep.
Signed-off-by: Joe Ratterman <jratt0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/grep.c')
-rw-r--r-- | builtin/grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 34f9ae0304..bb0f93208f 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -864,7 +864,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) OPT_BOOLEAN('F', "fixed-strings", &opt.fixed, "interpret patterns as fixed strings"), OPT_GROUP(""), - OPT_BOOLEAN('n', NULL, &opt.linenum, "show line numbers"), + OPT_BOOLEAN('n', "line-number", &opt.linenum, "show line numbers"), OPT_NEGBIT('h', NULL, &opt.pathname, "don't show filenames", 1), OPT_BIT('H', NULL, &opt.pathname, "show filenames", 1), OPT_NEGBIT(0, "full-name", &opt.relative, |