]> asedeno.scripts.mit.edu Git - git.git/blobdiff - Documentation/git-grep.txt
Makefile: add missing dependency on http.h
[git.git] / Documentation / git-grep.txt
index 4b32322a67d9f3de8b555d3d9d03e7ddab14e0a7..5474dd7f94c4b3217230808e656662d0edcef207 100644 (file)
@@ -14,6 +14,7 @@ SYNOPSIS
           [-E | --extended-regexp] [-G | --basic-regexp]
           [-F | --fixed-strings] [-n]
           [-l | --files-with-matches] [-L | --files-without-match]
+          [(-O | --open-files-in-pager) [<pager>]]
           [-z | --null]
           [-c | --count] [--all-match] [-q | --quiet]
           [--max-depth <depth>]
@@ -104,6 +105,13 @@ OPTIONS
        For better compatibility with 'git diff', `--name-only` is a
        synonym for `--files-with-matches`.
 
+-O [<pager>]::
+--open-files-in-pager [<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
@@ -183,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.