X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=Documentation%2Fgit-grep.txt;h=5474dd7f94c4b3217230808e656662d0edcef207;hb=48c250a121a425a1860226b6a7061aecfbab5246;hp=ee506e67f09034591b4cd0215f72f61ff607d128;hpb=daaf2e8892cf3b652454c48ffd332e3c5b446b92;p=git.git diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index ee506e67f..5474dd7f9 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -14,10 +14,11 @@ SYNOPSIS [-E | --extended-regexp] [-G | --basic-regexp] [-F | --fixed-strings] [-n] [-l | --files-with-matches] [-L | --files-without-match] + [(-O | --open-files-in-pager) []] [-z | --null] [-c | --count] [--all-match] [-q | --quiet] [--max-depth ] - [--color | --no-color] + [--color[=] | --no-color] [-A ] [-B ] [-C ] [-f ] [-e] [--and|--or|--not|(|)|-e ...] @@ -104,6 +105,13 @@ OPTIONS For better compatibility with 'git diff', `--name-only` is a synonym for `--files-with-matches`. +-O []:: +--open-files-in-pager []:: + Open the matching files in the pager (not the output of 'grep'). + If the pager happens to be "less" or "vi", and the user + specified only one pattern, the first file is positioned at + the first match automatically. + -z:: --null:: Output \0 instead of the character that normally follows a @@ -114,12 +122,14 @@ OPTIONS Instead of showing every matched line, show the number of lines that match. ---color:: +--color[=]:: Show colored matches. + The value must be always (the default), never, or auto. --no-color:: Turn off match highlighting, even when the configuration file gives the default to color output. + Same as `--color=never`. -[ABC] :: Show `context` trailing (`A` -- after), or leading (`B` @@ -181,7 +191,7 @@ OPTIONS Examples -------- -git grep 'time_t' -- '*.[ch]':: +git grep 'time_t' \-- '*.[ch]':: Looks for `time_t` in all tracked .c and .h files in the working directory and its subdirectories.