From 1b42a0f040c366bde1ca0db50b6985d50d87b5d4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 9 Sep 2015 21:00:41 +0300 Subject: [PATCH] Change wording about ``git grep`` and ``less +/$pattern`` --- pep-git.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pep-git.txt b/pep-git.txt index 80d2a84..d7eb199 100644 --- a/pep-git.txt +++ b/pep-git.txt @@ -784,9 +784,12 @@ but you can use your editor:: $ git grep -Ovim # but not -O vim -BTW, there is a difference between running ``git grep -O`` and ``git -grep -Oless`` - in the latter case ``git grep`` passes ``+/pattern`` -option to ``less``. +BTW, if git is instructed to use ``less`` as the pager (i.e., if pager +is not configured in git at all it uses ``less`` by default, or if it +gets ``less`` from PAGER environment variable, or if it was configured +with ``git config --global core.pager less``, or ``less`` is used in +the command ``git grep -Oless``) ``git grep`` passes ``+/$pattern`` +option to ``less`` which is quite convenient. bash/zsh completion -- 2.39.5