diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2010-06-12 11:39:46 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-13 09:16:50 -0700 |
commit | 0af88c15e2eb0a680c3797da8d8b97636b797f66 (patch) | |
tree | 6d2d69904950d2da789747f8a1ac718f4c4793f9 /Documentation/git-grep.txt | |
parent | 678e484b7d4e6388edeec3470bbbcd206817c148 (diff) | |
download | git-0af88c15e2eb0a680c3797da8d8b97636b797f66.tar.gz |
grep -O: allow optional argument specifying the pager (or editor)
Suppose you want to edit all files that contain a specific search term.
Of course, you can do something totally trivial such as
git grep -z -e <term> | xargs -0r vi +/<term>
but maybe you are happy that the same will be achieved by
git grep -Ovi <term>
now.
[jn: rebased and added tests]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r-- | Documentation/git-grep.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 8fdd8e1e42..d89ec32485 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -14,7 +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] + [(-O | --open-files-in-pager) [<pager>]] [-z | --null] [-c | --count] [--all-match] [-q | --quiet] [--max-depth <depth>] @@ -105,8 +105,8 @@ OPTIONS For better compatibility with 'git diff', `--name-only` is a synonym for `--files-with-matches`. --O:: ---open-files-in-pager:: +-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 |