Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add specs for grep context and git grep function context lines
When called with the '-A', '-B' or '-C' flags, 'grep' and 'git grep' show the line number for context lines enclosed with dashes, for example: $ grep -r -A 2 -n spec . ./autoload/fetch.vim:9:" Position specs Dictionary: {{{ ./autoload/fetch.vim:10:let s:specs = {} ./autoload/fetch.vim-11- ./autoload/fetch.vim-12-" - trailing colon, i.e. ':lnum[:colnum[:]]' Similarly, 'git grep', when called with the '-p' flag, shows the line number for the nearest function line enclosed with equal signs, for example: $ git grep -p show-function builtin/grep.c=796=int cmd_grep(int argc, const char **argv, const char *prefix) builtin/grep.c:894: OPT_BOOL('p', "show-function", &opt.funcname, Add specs for these.
- Loading branch information